SlideShare a Scribd company logo
1 of 29
Experiences with using Python in Mercurial
Martin Geisler
mg@aragost.com
Python Geek Night
November 16th, 2010
aragost Trifork
About the Speaker
Martin Geisler:
core Mercurial developer:
reviews patches from the community
helps users in our IRC channel
2 / 16
aragost Trifork
About the Speaker
Martin Geisler:
core Mercurial developer:
reviews patches from the community
helps users in our IRC channel
PhD in Computer Science from Aarhus University, DK
exchange student at ETH Zurich in 2005
visited IBM Zurich Research Lab in 2008
2 / 16
aragost Trifork
About the Speaker
Martin Geisler:
core Mercurial developer:
reviews patches from the community
helps users in our IRC channel
PhD in Computer Science from Aarhus University, DK
exchange student at ETH Zurich in 2005
visited IBM Zurich Research Lab in 2008
now working at aragost Trifork, Zurich
offers professional Mercurial support
customization, migration, training
advice on best practices
2 / 16
aragost Trifork
Outline
Introduction
Python-Specific Tricks
Traditional Techniques
Conclusion
3 / 16
aragost Trifork
Outline
Introduction
Python-Specific Tricks
Traditional Techniques
Conclusion
4 / 16
aragost Trifork
Mercurial in 3 Minutes
Mercurial is a distributed revision control system:
traditional systems (SVN, ClearCase, . . . ) have one server
newer systems (Mercurial, Git, . . . ) have many servers
Alice Bob
hello.c
Makefile
commit
update
push
pull
5 / 16
aragost Trifork
Who is Using it?
Mercurial is used by:
Oracle for Java, OpenSolaris, NetBeans, OpenOffice, . . .
Mozilla for Firefox, Thunderbird, . . .
Google
many more. . .
6 / 16
aragost Trifork
Who is Using it?
Mercurial is used by:
Oracle for Java, OpenSolaris, NetBeans, OpenOffice, . . .
Mozilla for Firefox, Thunderbird, . . .
Google
many more. . .Want to know more?
Come to the free Mercurial Kick Start II!
Date: Wednesday, November 24th,
Place: Technopark, Zurich
See http://trifork.ch/
6 / 16
aragost Trifork
Outline
Introduction
Python-Specific Tricks
Traditional Techniques
Conclusion
7 / 16
aragost Trifork
Advantages of Python
We like Python because of:
rapid prototyping
the revlog data structure in a 1 hour train ride
good cross-platform support
We want to support Windows, Mac, Linux, . . .
very clean syntax
easy to pick up for contributors
8 / 16
aragost Trifork
Making Mercurial Start Fast
When you do import foo, Python does:
search for foo.py, foo.pyc, and foo.pyo
see if foo.py is newer than foo.pyc or foo.pyo
load and execute found module
do the whole thing recursively. . .
9 / 16
aragost Trifork
Making Mercurial Start Fast
When you do import foo, Python does:
search for foo.py, foo.pyc, and foo.pyo
see if foo.py is newer than foo.pyc or foo.pyo
load and execute found module
do the whole thing recursively. . .
Starting Mercurial with demandimport disabled:
$ time hg version
0.20s user 0.04s system 100% cpu 0.239 total
This delay is already very noticeable!
9 / 16
aragost Trifork
Making Mercurial Start Fast
When you do import foo, Python does:
search for foo.py, foo.pyc, and foo.pyo
see if foo.py is newer than foo.pyc or foo.pyo
load and execute found module
do the whole thing recursively. . .
Starting Mercurial with demandimport disabled:
$ time hg version
0.20s user 0.04s system 100% cpu 0.239 total
This delay is already very noticeable!
Starting Mercurial with demandimport enabled:
$ time hg version
0.04s user 0.01s system 100% cpu 0.048 total
9 / 16
aragost Trifork
Imported Modules
Effect of using demandimport on number of modules imported:
System Without With
Python 17 —
Mercurial 305 69
I have enabled 14 typical extensions where:
convert pulls in Subversion and Bazaar modules
highlight pulls in Pygments modules
patchbomb pulls in email modules
etc. . .
10 / 16
aragost Trifork
Outline
Introduction
Python-Specific Tricks
Traditional Techniques
Conclusion
11 / 16
aragost Trifork
Optimizing Code
Start by profiling, then remove bottlenecks:
use the right data structures
add caches for data you reuse often
rewrite in a faster language
12 / 16
aragost Trifork
Efficient Data Structures
Mercurial avoids seeks since they are expensive:
any revision can be reconstructed with 1 seek and 1 read:
snapshot ∆ ∆ ∆ snapshot ∆ ∆ ∆ ∆
1 2 3 4 5 6 7 8 9
revision 8
13 / 16
aragost Trifork
Efficient Data Structures
Mercurial avoids seeks since they are expensive:
any revision can be reconstructed with 1 seek and 1 read:
snapshot ∆ ∆ ∆ snapshot ∆ ∆ ∆ ∆
1 2 3 4 5 6 7 8 9
revision 8
directory order is maintained in repository:
bar
baz
foo
.hg/store/data/bar.i
.hg/store/data/baz.i
.hg/store/data/foo.i
13 / 16
aragost Trifork
Efficient Data Structures
Mercurial avoids seeks since they are expensive:
any revision can be reconstructed with 1 seek and 1 read:
snapshot ∆ ∆ ∆ snapshot ∆ ∆ ∆ ∆
1 2 3 4 5 6 7 8 9
revision 8
directory order is maintained in repository:
bar
baz
foo
.hg/store/data/bar.i
.hg/store/data/baz.i
.hg/store/data/foo.i
optimizes use of kernel readahead
13 / 16
aragost Trifork
Rewrite in Faster Language
If parts of your program are too slow, rewrite them!
Python
Java
C asm
Python embraces this hybrid approach:
easy to build C extension modules with distutils
Mercurial has six such extension modules
14 / 16
aragost Trifork
Outline
Introduction
Python-Specific Tricks
Traditional Techniques
Conclusion
15 / 16
aragost Trifork
Conclusion
Mercurial is almost pure Python code:
Language Lines %
Python 62,205 95%
C 3,474 5%
Python makes it possible to strike a good balance between
highly maintainable Python code
performance critical C code
16 / 16
aragost Trifork
Conclusion
Mercurial is almost pure Python code:
Language Lines %
Python 62,205 95%
C 3,474 5%
Python makes it possible to strike a good balance between
highly maintainable Python code
performance critical C code
Thank you for the attention!
16 / 16
aragost Trifork
Conclusion
Mercurial is almost pure Python code:
Language Lines %
Python 62,205 95%
C 3,474 5%
Python makes it possible to strike a good balance between
highly maintainable Python code
performance critical C code
Thank you for the attention!
Mercurial
Kick Start II
November 24th
trifork.ch
16 / 16
aragost Trifork
OpenOffice
Fairly large repository:
70,000 files, 2,0 GB of data
270,000 changesets, 2,3 GB of history
Mercurial is still fast on a repository of this size:
$ time hg status
0.45s user 0.15s system 99% cpu 0.605 total
$ time hg tip
0.28s user 0.03s system 99% cpu 0.309 total
$ time hg log -r DEV300_m50
0.30s user 0.04s system 99% cpu 0.334 total
$ time hg diff
0.74s user 0.16s system 88% cpu 1.006 total
$ time hg commit -m ’Small change’
1.77s user 0.25s system 98% cpu 2.053 total
17 / 16
aragost Trifork
Demand-Loading Python Modules
Rewiring the import statement is quite easy!
import __builtin__
_origimport = __import__ # save for later
class _demandmod(object):
"""module demand-loader and proxy"""
# ... one slide away
# modules that require immediate ImportErrors
ignore = [’_hashlib’, ’_xmlplus’, ’fcntl’, ...]
def _demandimport(name, globals, locals, fromlist):
"""import name and return _demandmod proxy"""
# ... two slides away
def enable():
__builtin__.__import__ = _demandimport
18 / 16
aragost Trifork
Proxy Modules
class _demandmod(object):
def __init__(self, n, g, l):
object.__setattr__(self, "_data", (n, g, l))
object.__setattr__(self, "_module", None)
def _loadmodule(self):
if not self._module:
mod = _origimport(*self._data)
object.__setattr__(self, "_module", mod)
return self._module
def __getattribute__(self, attr):
if attr in (’_data’, ’_loadmodule’, ’_module’):
return object.__getattribute__(self, attr)
return getattr(self._loadmodule(), attr)
def __setattr__(self, attr, val):
setattr(self._loadmodule(), attr, val)
19 / 16
aragost Trifork
New Import Function
def _demandimport(name, globals, locals, fromlist):
if name in ignore or fromlist == (’*’,):
# ignored module or "from a import *"
return _origimport(name, globals, locals, fromlist)
elif not fromlist:
# "import a" or "import a as b"
return _demandmod(name, globals, locals)
else:
# "from a import b, c"
mod = _origimport(name, globals, locals)
for x in fromlist:
# set requested submodules for demand load
if not hasattr(mod, x):
submod = _demandmod(x, mod.__dict__, locals)
setattr(mod, x, submod)
return mod
20 / 16

More Related Content

What's hot

Make container without_docker_7
Make container without_docker_7Make container without_docker_7
Make container without_docker_7Sam Kim
 
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...sanghwan ahn
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptablesKernel TLV
 
Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Sam Kim
 
Talk 160920 @ Cat System Workshop
Talk 160920 @ Cat System WorkshopTalk 160920 @ Cat System Workshop
Talk 160920 @ Cat System WorkshopQuey-Liang Kao
 
Linux Kernel 개발참여방법과 문화 (Contribution)
Linux Kernel 개발참여방법과 문화 (Contribution)Linux Kernel 개발참여방법과 문화 (Contribution)
Linux Kernel 개발참여방법과 문화 (Contribution)Ubuntu Korea Community
 
Atmosphere 2016 - Lennart poettering - systemd and Containers
Atmosphere 2016 - Lennart poettering  - systemd and ContainersAtmosphere 2016 - Lennart poettering  - systemd and Containers
Atmosphere 2016 - Lennart poettering - systemd and ContainersPROIDEA
 
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템Sam Kim
 
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018DevOpsDays Tel Aviv
 
PLDI 2010: Safe to the Last Instruction
PLDI 2010: Safe to the Last InstructionPLDI 2010: Safe to the Last Instruction
PLDI 2010: Safe to the Last Instructionjxyz
 
Pulp 3 - Simpler, Better, More awesome
Pulp 3 - Simpler, Better, More awesomePulp 3 - Simpler, Better, More awesome
Pulp 3 - Simpler, Better, More awesomeDennis Kliban
 
The Practice of Alluxio in Ctrip Bigdata Platform
The Practice of Alluxio in Ctrip Bigdata PlatformThe Practice of Alluxio in Ctrip Bigdata Platform
The Practice of Alluxio in Ctrip Bigdata PlatformAlluxio, Inc.
 
Gbroccolo pgconfeu2016 pgnfs
Gbroccolo pgconfeu2016 pgnfsGbroccolo pgconfeu2016 pgnfs
Gbroccolo pgconfeu2016 pgnfsGiuseppe Broccolo
 
Firebird2.5 Benchmarks(English)20091031
Firebird2.5 Benchmarks(English)20091031Firebird2.5 Benchmarks(English)20091031
Firebird2.5 Benchmarks(English)20091031Tsutomu Hayashi
 
Raspberry Pi + ROS
Raspberry Pi + ROSRaspberry Pi + ROS
Raspberry Pi + ROSArnoldBail
 

What's hot (18)

Make container without_docker_7
Make container without_docker_7Make container without_docker_7
Make container without_docker_7
 
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 
Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1
 
Talk 160920 @ Cat System Workshop
Talk 160920 @ Cat System WorkshopTalk 160920 @ Cat System Workshop
Talk 160920 @ Cat System Workshop
 
Page table manipulation attack
Page table manipulation attackPage table manipulation attack
Page table manipulation attack
 
Linux Kernel 개발참여방법과 문화 (Contribution)
Linux Kernel 개발참여방법과 문화 (Contribution)Linux Kernel 개발참여방법과 문화 (Contribution)
Linux Kernel 개발참여방법과 문화 (Contribution)
 
Atmosphere 2016 - Lennart poettering - systemd and Containers
Atmosphere 2016 - Lennart poettering  - systemd and ContainersAtmosphere 2016 - Lennart poettering  - systemd and Containers
Atmosphere 2016 - Lennart poettering - systemd and Containers
 
Unix ch03-03(2)
Unix ch03-03(2)Unix ch03-03(2)
Unix ch03-03(2)
 
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
 
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
Pcapy and dpkt - tcpdump on steroids - Ran Leibman - DevOpsDays Tel Aviv 2018
 
PLDI 2010: Safe to the Last Instruction
PLDI 2010: Safe to the Last InstructionPLDI 2010: Safe to the Last Instruction
PLDI 2010: Safe to the Last Instruction
 
Pulp 3 - Simpler, Better, More awesome
Pulp 3 - Simpler, Better, More awesomePulp 3 - Simpler, Better, More awesome
Pulp 3 - Simpler, Better, More awesome
 
The Practice of Alluxio in Ctrip Bigdata Platform
The Practice of Alluxio in Ctrip Bigdata PlatformThe Practice of Alluxio in Ctrip Bigdata Platform
The Practice of Alluxio in Ctrip Bigdata Platform
 
Gbroccolo pgconfeu2016 pgnfs
Gbroccolo pgconfeu2016 pgnfsGbroccolo pgconfeu2016 pgnfs
Gbroccolo pgconfeu2016 pgnfs
 
Learn Python
Learn PythonLearn Python
Learn Python
 
Firebird2.5 Benchmarks(English)20091031
Firebird2.5 Benchmarks(English)20091031Firebird2.5 Benchmarks(English)20091031
Firebird2.5 Benchmarks(English)20091031
 
Raspberry Pi + ROS
Raspberry Pi + ROSRaspberry Pi + ROS
Raspberry Pi + ROS
 

Viewers also liked

Apresentação via populi
Apresentação via populiApresentação via populi
Apresentação via populiVia Populi
 
Proper management and responsible use of refrigerants
Proper management and responsible use of refrigerantsProper management and responsible use of refrigerants
Proper management and responsible use of refrigerantsUNEP OzonAction
 
What can we do in Hungary for safer environment in utilization of SF6
What can we do in Hungary for safer environment in utilization of SF6What can we do in Hungary for safer environment in utilization of SF6
What can we do in Hungary for safer environment in utilization of SF6UNEP OzonAction
 
Mobile Banking 2011: Clairmail
Mobile Banking 2011: ClairmailMobile Banking 2011: Clairmail
Mobile Banking 2011: ClairmailAberla
 

Viewers also liked (6)

Apresentação via populi
Apresentação via populiApresentação via populi
Apresentação via populi
 
Bio
BioBio
Bio
 
5 Grammar
5 Grammar5 Grammar
5 Grammar
 
Proper management and responsible use of refrigerants
Proper management and responsible use of refrigerantsProper management and responsible use of refrigerants
Proper management and responsible use of refrigerants
 
What can we do in Hungary for safer environment in utilization of SF6
What can we do in Hungary for safer environment in utilization of SF6What can we do in Hungary for safer environment in utilization of SF6
What can we do in Hungary for safer environment in utilization of SF6
 
Mobile Banking 2011: Clairmail
Mobile Banking 2011: ClairmailMobile Banking 2011: Clairmail
Mobile Banking 2011: Clairmail
 

Similar to Python by Martin Geisler

FAIR Projector Builder
FAIR Projector BuilderFAIR Projector Builder
FAIR Projector BuilderMark Wilkinson
 
Open erp on ubuntu
Open erp on ubuntuOpen erp on ubuntu
Open erp on ubuntuIker Coranti
 
Pharo3 at Fosdem
Pharo3 at FosdemPharo3 at Fosdem
Pharo3 at FosdemPharo
 
Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014ESUG
 
Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014Marcus Denker
 
Efficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native EnvironmentsEfficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native EnvironmentsGergely Szabó
 
The Onward Journey: Porting Twisted to Python 3
The Onward Journey: Porting Twisted to Python 3The Onward Journey: Porting Twisted to Python 3
The Onward Journey: Porting Twisted to Python 3Craig Rodrigues
 
Python Evolution
Python EvolutionPython Evolution
Python EvolutionQuintagroup
 
carrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-APIcarrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-APIYoni Davidson
 
Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo
 
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTInria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTStéphanie Roger
 
Triggers In MongoDB
Triggers In MongoDBTriggers In MongoDB
Triggers In MongoDBJason Terpko
 
Microsoft kafka load imbalance
Microsoft   kafka load imbalanceMicrosoft   kafka load imbalance
Microsoft kafka load imbalanceNitin Kumar
 
Easy contributable internationalization process with Sphinx @ PyCon APAC 2016
Easy contributable internationalization process with Sphinx @ PyCon APAC 2016Easy contributable internationalization process with Sphinx @ PyCon APAC 2016
Easy contributable internationalization process with Sphinx @ PyCon APAC 2016Takayuki Shimizukawa
 
OpenStack: A python based IaaS provider
OpenStack: A python based IaaS providerOpenStack: A python based IaaS provider
OpenStack: A python based IaaS providerFlavio Percoco Premoli
 

Similar to Python by Martin Geisler (20)

Python arch wiki
Python   arch wikiPython   arch wiki
Python arch wiki
 
Pharo3 at Fosdem
Pharo3 at FosdemPharo3 at Fosdem
Pharo3 at Fosdem
 
FAIR Projector Builder
FAIR Projector BuilderFAIR Projector Builder
FAIR Projector Builder
 
Open erp on ubuntu
Open erp on ubuntuOpen erp on ubuntu
Open erp on ubuntu
 
Pharo3 at Fosdem
Pharo3 at FosdemPharo3 at Fosdem
Pharo3 at Fosdem
 
Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014
 
Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014
 
Efficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native EnvironmentsEfficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native Environments
 
2to3
2to32to3
2to3
 
The Onward Journey: Porting Twisted to Python 3
The Onward Journey: Porting Twisted to Python 3The Onward Journey: Porting Twisted to Python 3
The Onward Journey: Porting Twisted to Python 3
 
Python Evolution
Python EvolutionPython Evolution
Python Evolution
 
carrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-APIcarrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-API
 
Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014
 
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTInria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
 
TYPO3 at UNESCO.org
TYPO3 at UNESCO.orgTYPO3 at UNESCO.org
TYPO3 at UNESCO.org
 
Triggers In MongoDB
Triggers In MongoDBTriggers In MongoDB
Triggers In MongoDB
 
Microsoft kafka load imbalance
Microsoft   kafka load imbalanceMicrosoft   kafka load imbalance
Microsoft kafka load imbalance
 
儲かるドキュメント
儲かるドキュメント儲かるドキュメント
儲かるドキュメント
 
Easy contributable internationalization process with Sphinx @ PyCon APAC 2016
Easy contributable internationalization process with Sphinx @ PyCon APAC 2016Easy contributable internationalization process with Sphinx @ PyCon APAC 2016
Easy contributable internationalization process with Sphinx @ PyCon APAC 2016
 
OpenStack: A python based IaaS provider
OpenStack: A python based IaaS providerOpenStack: A python based IaaS provider
OpenStack: A python based IaaS provider
 

More from Aberla

Mobile Banking 2011: DAB
Mobile Banking 2011: DABMobile Banking 2011: DAB
Mobile Banking 2011: DABAberla
 
Mobile Banking 2011: Sparkasse
Mobile Banking 2011: SparkasseMobile Banking 2011: Sparkasse
Mobile Banking 2011: SparkasseAberla
 
Mobile Banking 2011: Credit Suisse
Mobile Banking 2011: Credit SuisseMobile Banking 2011: Credit Suisse
Mobile Banking 2011: Credit SuisseAberla
 
Mobile Banking 2011: Danske Bank
Mobile Banking 2011: Danske BankMobile Banking 2011: Danske Bank
Mobile Banking 2011: Danske BankAberla
 
Mobile Banking 2011: Postfinance
Mobile Banking 2011: PostfinanceMobile Banking 2011: Postfinance
Mobile Banking 2011: PostfinanceAberla
 
ESeconf2011 - Haug Thomas: "Sauberer Code mit Metriken"
ESeconf2011 - Haug Thomas: "Sauberer Code mit Metriken"ESeconf2011 - Haug Thomas: "Sauberer Code mit Metriken"
ESeconf2011 - Haug Thomas: "Sauberer Code mit Metriken"Aberla
 
ESEconf2011 - Cruywagen Leon: "Cool ways to work smarter in the cloud"
ESEconf2011 - Cruywagen Leon: "Cool ways to work smarter in the cloud"ESEconf2011 - Cruywagen Leon: "Cool ways to work smarter in the cloud"
ESEconf2011 - Cruywagen Leon: "Cool ways to work smarter in the cloud"Aberla
 
ESEconf2011 - Wichmann Klaus-Peter: "Kennen Sie die Leistungsfähigkeit Ihres ...
ESEconf2011 - Wichmann Klaus-Peter: "Kennen Sie die Leistungsfähigkeit Ihres ...ESEconf2011 - Wichmann Klaus-Peter: "Kennen Sie die Leistungsfähigkeit Ihres ...
ESEconf2011 - Wichmann Klaus-Peter: "Kennen Sie die Leistungsfähigkeit Ihres ...Aberla
 
ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...
ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...
ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...Aberla
 
ESEconf2011 - Lorenz Oliver: "'Agil heisst nicht beliebit' - Scrum als wirksa...
ESEconf2011 - Lorenz Oliver: "'Agil heisst nicht beliebit' - Scrum als wirksa...ESEconf2011 - Lorenz Oliver: "'Agil heisst nicht beliebit' - Scrum als wirksa...
ESEconf2011 - Lorenz Oliver: "'Agil heisst nicht beliebit' - Scrum als wirksa...Aberla
 
ESEconf2011 - Schilling Rüdiger: "Generative Konzepte für den Plattform-Zoo -...
ESEconf2011 - Schilling Rüdiger: "Generative Konzepte für den Plattform-Zoo -...ESEconf2011 - Schilling Rüdiger: "Generative Konzepte für den Plattform-Zoo -...
ESEconf2011 - Schilling Rüdiger: "Generative Konzepte für den Plattform-Zoo -...Aberla
 
ESEconf2011 - Freixa Vidal Roger: "Oracle's Java Strategy"
ESEconf2011 - Freixa Vidal Roger: "Oracle's Java Strategy"ESEconf2011 - Freixa Vidal Roger: "Oracle's Java Strategy"
ESEconf2011 - Freixa Vidal Roger: "Oracle's Java Strategy"Aberla
 
ESEconf2011 - Westphal Ralf: "Slice me nice - Produktiv, schnell, zufrieden"
ESEconf2011 - Westphal Ralf: "Slice me nice - Produktiv, schnell, zufrieden"ESEconf2011 - Westphal Ralf: "Slice me nice - Produktiv, schnell, zufrieden"
ESEconf2011 - Westphal Ralf: "Slice me nice - Produktiv, schnell, zufrieden"Aberla
 
ESEconf2011 - Caine Matthew: "Creating an Environment of Teamwork, Quality, I...
ESEconf2011 - Caine Matthew: "Creating an Environment of Teamwork, Quality, I...ESEconf2011 - Caine Matthew: "Creating an Environment of Teamwork, Quality, I...
ESEconf2011 - Caine Matthew: "Creating an Environment of Teamwork, Quality, I...Aberla
 
ESEconf2011 - Schwaber Ken: "Scrum: Necessary but not sufficient for agility"
ESEconf2011 - Schwaber Ken: "Scrum: Necessary but not sufficient for agility"ESEconf2011 - Schwaber Ken: "Scrum: Necessary but not sufficient for agility"
ESEconf2011 - Schwaber Ken: "Scrum: Necessary but not sufficient for agility"Aberla
 
ESEconf2011 - Kaiser Traian: "How to measure productivity in software develop...
ESEconf2011 - Kaiser Traian: "How to measure productivity in software develop...ESEconf2011 - Kaiser Traian: "How to measure productivity in software develop...
ESEconf2011 - Kaiser Traian: "How to measure productivity in software develop...Aberla
 
ESEconf2011 - Haas Thomas & Jenni Joscha: "Ein Softwareprojekt zum Festpreis ...
ESEconf2011 - Haas Thomas & Jenni Joscha: "Ein Softwareprojekt zum Festpreis ...ESEconf2011 - Haas Thomas & Jenni Joscha: "Ein Softwareprojekt zum Festpreis ...
ESEconf2011 - Haas Thomas & Jenni Joscha: "Ein Softwareprojekt zum Festpreis ...Aberla
 
ESEconf2011 - Buschmann Frank: "What architects need to know"
ESEconf2011 - Buschmann Frank: "What architects need to know"ESEconf2011 - Buschmann Frank: "What architects need to know"
ESEconf2011 - Buschmann Frank: "What architects need to know"Aberla
 
ESEconf2011 - Arrenbrecht Peter: "Literate Testing: Stimmige API's machen meh...
ESEconf2011 - Arrenbrecht Peter: "Literate Testing: Stimmige API's machen meh...ESEconf2011 - Arrenbrecht Peter: "Literate Testing: Stimmige API's machen meh...
ESEconf2011 - Arrenbrecht Peter: "Literate Testing: Stimmige API's machen meh...Aberla
 
ESEconf2011 - Bosch Andy: "JavaServer Faces im Portal - Statusbestimmung"
ESEconf2011 - Bosch Andy: "JavaServer Faces im Portal - Statusbestimmung"ESEconf2011 - Bosch Andy: "JavaServer Faces im Portal - Statusbestimmung"
ESEconf2011 - Bosch Andy: "JavaServer Faces im Portal - Statusbestimmung"Aberla
 

More from Aberla (20)

Mobile Banking 2011: DAB
Mobile Banking 2011: DABMobile Banking 2011: DAB
Mobile Banking 2011: DAB
 
Mobile Banking 2011: Sparkasse
Mobile Banking 2011: SparkasseMobile Banking 2011: Sparkasse
Mobile Banking 2011: Sparkasse
 
Mobile Banking 2011: Credit Suisse
Mobile Banking 2011: Credit SuisseMobile Banking 2011: Credit Suisse
Mobile Banking 2011: Credit Suisse
 
Mobile Banking 2011: Danske Bank
Mobile Banking 2011: Danske BankMobile Banking 2011: Danske Bank
Mobile Banking 2011: Danske Bank
 
Mobile Banking 2011: Postfinance
Mobile Banking 2011: PostfinanceMobile Banking 2011: Postfinance
Mobile Banking 2011: Postfinance
 
ESeconf2011 - Haug Thomas: "Sauberer Code mit Metriken"
ESeconf2011 - Haug Thomas: "Sauberer Code mit Metriken"ESeconf2011 - Haug Thomas: "Sauberer Code mit Metriken"
ESeconf2011 - Haug Thomas: "Sauberer Code mit Metriken"
 
ESEconf2011 - Cruywagen Leon: "Cool ways to work smarter in the cloud"
ESEconf2011 - Cruywagen Leon: "Cool ways to work smarter in the cloud"ESEconf2011 - Cruywagen Leon: "Cool ways to work smarter in the cloud"
ESEconf2011 - Cruywagen Leon: "Cool ways to work smarter in the cloud"
 
ESEconf2011 - Wichmann Klaus-Peter: "Kennen Sie die Leistungsfähigkeit Ihres ...
ESEconf2011 - Wichmann Klaus-Peter: "Kennen Sie die Leistungsfähigkeit Ihres ...ESEconf2011 - Wichmann Klaus-Peter: "Kennen Sie die Leistungsfähigkeit Ihres ...
ESEconf2011 - Wichmann Klaus-Peter: "Kennen Sie die Leistungsfähigkeit Ihres ...
 
ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...
ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...
ESEconf2011 - Hanin Makram: "Embedding Performance into Continuous Integratio...
 
ESEconf2011 - Lorenz Oliver: "'Agil heisst nicht beliebit' - Scrum als wirksa...
ESEconf2011 - Lorenz Oliver: "'Agil heisst nicht beliebit' - Scrum als wirksa...ESEconf2011 - Lorenz Oliver: "'Agil heisst nicht beliebit' - Scrum als wirksa...
ESEconf2011 - Lorenz Oliver: "'Agil heisst nicht beliebit' - Scrum als wirksa...
 
ESEconf2011 - Schilling Rüdiger: "Generative Konzepte für den Plattform-Zoo -...
ESEconf2011 - Schilling Rüdiger: "Generative Konzepte für den Plattform-Zoo -...ESEconf2011 - Schilling Rüdiger: "Generative Konzepte für den Plattform-Zoo -...
ESEconf2011 - Schilling Rüdiger: "Generative Konzepte für den Plattform-Zoo -...
 
ESEconf2011 - Freixa Vidal Roger: "Oracle's Java Strategy"
ESEconf2011 - Freixa Vidal Roger: "Oracle's Java Strategy"ESEconf2011 - Freixa Vidal Roger: "Oracle's Java Strategy"
ESEconf2011 - Freixa Vidal Roger: "Oracle's Java Strategy"
 
ESEconf2011 - Westphal Ralf: "Slice me nice - Produktiv, schnell, zufrieden"
ESEconf2011 - Westphal Ralf: "Slice me nice - Produktiv, schnell, zufrieden"ESEconf2011 - Westphal Ralf: "Slice me nice - Produktiv, schnell, zufrieden"
ESEconf2011 - Westphal Ralf: "Slice me nice - Produktiv, schnell, zufrieden"
 
ESEconf2011 - Caine Matthew: "Creating an Environment of Teamwork, Quality, I...
ESEconf2011 - Caine Matthew: "Creating an Environment of Teamwork, Quality, I...ESEconf2011 - Caine Matthew: "Creating an Environment of Teamwork, Quality, I...
ESEconf2011 - Caine Matthew: "Creating an Environment of Teamwork, Quality, I...
 
ESEconf2011 - Schwaber Ken: "Scrum: Necessary but not sufficient for agility"
ESEconf2011 - Schwaber Ken: "Scrum: Necessary but not sufficient for agility"ESEconf2011 - Schwaber Ken: "Scrum: Necessary but not sufficient for agility"
ESEconf2011 - Schwaber Ken: "Scrum: Necessary but not sufficient for agility"
 
ESEconf2011 - Kaiser Traian: "How to measure productivity in software develop...
ESEconf2011 - Kaiser Traian: "How to measure productivity in software develop...ESEconf2011 - Kaiser Traian: "How to measure productivity in software develop...
ESEconf2011 - Kaiser Traian: "How to measure productivity in software develop...
 
ESEconf2011 - Haas Thomas & Jenni Joscha: "Ein Softwareprojekt zum Festpreis ...
ESEconf2011 - Haas Thomas & Jenni Joscha: "Ein Softwareprojekt zum Festpreis ...ESEconf2011 - Haas Thomas & Jenni Joscha: "Ein Softwareprojekt zum Festpreis ...
ESEconf2011 - Haas Thomas & Jenni Joscha: "Ein Softwareprojekt zum Festpreis ...
 
ESEconf2011 - Buschmann Frank: "What architects need to know"
ESEconf2011 - Buschmann Frank: "What architects need to know"ESEconf2011 - Buschmann Frank: "What architects need to know"
ESEconf2011 - Buschmann Frank: "What architects need to know"
 
ESEconf2011 - Arrenbrecht Peter: "Literate Testing: Stimmige API's machen meh...
ESEconf2011 - Arrenbrecht Peter: "Literate Testing: Stimmige API's machen meh...ESEconf2011 - Arrenbrecht Peter: "Literate Testing: Stimmige API's machen meh...
ESEconf2011 - Arrenbrecht Peter: "Literate Testing: Stimmige API's machen meh...
 
ESEconf2011 - Bosch Andy: "JavaServer Faces im Portal - Statusbestimmung"
ESEconf2011 - Bosch Andy: "JavaServer Faces im Portal - Statusbestimmung"ESEconf2011 - Bosch Andy: "JavaServer Faces im Portal - Statusbestimmung"
ESEconf2011 - Bosch Andy: "JavaServer Faces im Portal - Statusbestimmung"
 

Recently uploaded

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Recently uploaded (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Python by Martin Geisler

  • 1. Experiences with using Python in Mercurial Martin Geisler mg@aragost.com Python Geek Night November 16th, 2010
  • 2. aragost Trifork About the Speaker Martin Geisler: core Mercurial developer: reviews patches from the community helps users in our IRC channel 2 / 16
  • 3. aragost Trifork About the Speaker Martin Geisler: core Mercurial developer: reviews patches from the community helps users in our IRC channel PhD in Computer Science from Aarhus University, DK exchange student at ETH Zurich in 2005 visited IBM Zurich Research Lab in 2008 2 / 16
  • 4. aragost Trifork About the Speaker Martin Geisler: core Mercurial developer: reviews patches from the community helps users in our IRC channel PhD in Computer Science from Aarhus University, DK exchange student at ETH Zurich in 2005 visited IBM Zurich Research Lab in 2008 now working at aragost Trifork, Zurich offers professional Mercurial support customization, migration, training advice on best practices 2 / 16
  • 7. aragost Trifork Mercurial in 3 Minutes Mercurial is a distributed revision control system: traditional systems (SVN, ClearCase, . . . ) have one server newer systems (Mercurial, Git, . . . ) have many servers Alice Bob hello.c Makefile commit update push pull 5 / 16
  • 8. aragost Trifork Who is Using it? Mercurial is used by: Oracle for Java, OpenSolaris, NetBeans, OpenOffice, . . . Mozilla for Firefox, Thunderbird, . . . Google many more. . . 6 / 16
  • 9. aragost Trifork Who is Using it? Mercurial is used by: Oracle for Java, OpenSolaris, NetBeans, OpenOffice, . . . Mozilla for Firefox, Thunderbird, . . . Google many more. . .Want to know more? Come to the free Mercurial Kick Start II! Date: Wednesday, November 24th, Place: Technopark, Zurich See http://trifork.ch/ 6 / 16
  • 11. aragost Trifork Advantages of Python We like Python because of: rapid prototyping the revlog data structure in a 1 hour train ride good cross-platform support We want to support Windows, Mac, Linux, . . . very clean syntax easy to pick up for contributors 8 / 16
  • 12. aragost Trifork Making Mercurial Start Fast When you do import foo, Python does: search for foo.py, foo.pyc, and foo.pyo see if foo.py is newer than foo.pyc or foo.pyo load and execute found module do the whole thing recursively. . . 9 / 16
  • 13. aragost Trifork Making Mercurial Start Fast When you do import foo, Python does: search for foo.py, foo.pyc, and foo.pyo see if foo.py is newer than foo.pyc or foo.pyo load and execute found module do the whole thing recursively. . . Starting Mercurial with demandimport disabled: $ time hg version 0.20s user 0.04s system 100% cpu 0.239 total This delay is already very noticeable! 9 / 16
  • 14. aragost Trifork Making Mercurial Start Fast When you do import foo, Python does: search for foo.py, foo.pyc, and foo.pyo see if foo.py is newer than foo.pyc or foo.pyo load and execute found module do the whole thing recursively. . . Starting Mercurial with demandimport disabled: $ time hg version 0.20s user 0.04s system 100% cpu 0.239 total This delay is already very noticeable! Starting Mercurial with demandimport enabled: $ time hg version 0.04s user 0.01s system 100% cpu 0.048 total 9 / 16
  • 15. aragost Trifork Imported Modules Effect of using demandimport on number of modules imported: System Without With Python 17 — Mercurial 305 69 I have enabled 14 typical extensions where: convert pulls in Subversion and Bazaar modules highlight pulls in Pygments modules patchbomb pulls in email modules etc. . . 10 / 16
  • 17. aragost Trifork Optimizing Code Start by profiling, then remove bottlenecks: use the right data structures add caches for data you reuse often rewrite in a faster language 12 / 16
  • 18. aragost Trifork Efficient Data Structures Mercurial avoids seeks since they are expensive: any revision can be reconstructed with 1 seek and 1 read: snapshot ∆ ∆ ∆ snapshot ∆ ∆ ∆ ∆ 1 2 3 4 5 6 7 8 9 revision 8 13 / 16
  • 19. aragost Trifork Efficient Data Structures Mercurial avoids seeks since they are expensive: any revision can be reconstructed with 1 seek and 1 read: snapshot ∆ ∆ ∆ snapshot ∆ ∆ ∆ ∆ 1 2 3 4 5 6 7 8 9 revision 8 directory order is maintained in repository: bar baz foo .hg/store/data/bar.i .hg/store/data/baz.i .hg/store/data/foo.i 13 / 16
  • 20. aragost Trifork Efficient Data Structures Mercurial avoids seeks since they are expensive: any revision can be reconstructed with 1 seek and 1 read: snapshot ∆ ∆ ∆ snapshot ∆ ∆ ∆ ∆ 1 2 3 4 5 6 7 8 9 revision 8 directory order is maintained in repository: bar baz foo .hg/store/data/bar.i .hg/store/data/baz.i .hg/store/data/foo.i optimizes use of kernel readahead 13 / 16
  • 21. aragost Trifork Rewrite in Faster Language If parts of your program are too slow, rewrite them! Python Java C asm Python embraces this hybrid approach: easy to build C extension modules with distutils Mercurial has six such extension modules 14 / 16
  • 23. aragost Trifork Conclusion Mercurial is almost pure Python code: Language Lines % Python 62,205 95% C 3,474 5% Python makes it possible to strike a good balance between highly maintainable Python code performance critical C code 16 / 16
  • 24. aragost Trifork Conclusion Mercurial is almost pure Python code: Language Lines % Python 62,205 95% C 3,474 5% Python makes it possible to strike a good balance between highly maintainable Python code performance critical C code Thank you for the attention! 16 / 16
  • 25. aragost Trifork Conclusion Mercurial is almost pure Python code: Language Lines % Python 62,205 95% C 3,474 5% Python makes it possible to strike a good balance between highly maintainable Python code performance critical C code Thank you for the attention! Mercurial Kick Start II November 24th trifork.ch 16 / 16
  • 26. aragost Trifork OpenOffice Fairly large repository: 70,000 files, 2,0 GB of data 270,000 changesets, 2,3 GB of history Mercurial is still fast on a repository of this size: $ time hg status 0.45s user 0.15s system 99% cpu 0.605 total $ time hg tip 0.28s user 0.03s system 99% cpu 0.309 total $ time hg log -r DEV300_m50 0.30s user 0.04s system 99% cpu 0.334 total $ time hg diff 0.74s user 0.16s system 88% cpu 1.006 total $ time hg commit -m ’Small change’ 1.77s user 0.25s system 98% cpu 2.053 total 17 / 16
  • 27. aragost Trifork Demand-Loading Python Modules Rewiring the import statement is quite easy! import __builtin__ _origimport = __import__ # save for later class _demandmod(object): """module demand-loader and proxy""" # ... one slide away # modules that require immediate ImportErrors ignore = [’_hashlib’, ’_xmlplus’, ’fcntl’, ...] def _demandimport(name, globals, locals, fromlist): """import name and return _demandmod proxy""" # ... two slides away def enable(): __builtin__.__import__ = _demandimport 18 / 16
  • 28. aragost Trifork Proxy Modules class _demandmod(object): def __init__(self, n, g, l): object.__setattr__(self, "_data", (n, g, l)) object.__setattr__(self, "_module", None) def _loadmodule(self): if not self._module: mod = _origimport(*self._data) object.__setattr__(self, "_module", mod) return self._module def __getattribute__(self, attr): if attr in (’_data’, ’_loadmodule’, ’_module’): return object.__getattribute__(self, attr) return getattr(self._loadmodule(), attr) def __setattr__(self, attr, val): setattr(self._loadmodule(), attr, val) 19 / 16
  • 29. aragost Trifork New Import Function def _demandimport(name, globals, locals, fromlist): if name in ignore or fromlist == (’*’,): # ignored module or "from a import *" return _origimport(name, globals, locals, fromlist) elif not fromlist: # "import a" or "import a as b" return _demandmod(name, globals, locals) else: # "from a import b, c" mod = _origimport(name, globals, locals) for x in fromlist: # set requested submodules for demand load if not hasattr(mod, x): submod = _demandmod(x, mod.__dict__, locals) setattr(mod, x, submod) return mod 20 / 16