I profiled your code (0.2.41ubuntu2) and on my computer the bottleneck is this statement: SourcesList()
The slow part of that is that it reads the info files in /usr/share/python-apt/templates/ every time.
And the slow part of that is that it tries to translate the descriptions.
I profiled your code (0.2.41ubuntu2) and on my computer the bottleneck is this statement:
SourcesList()
The slow part of that is that it reads the info files in share/python- apt/templates/
/usr/
every time.
And the slow part of that is that it tries to translate the descriptions.