FS#38695 - [python-markdown] Install pyc files also.

Attached to Project: Community Packages
Opened by Carlos (memeplex) - Monday, 27 January 2014, 23:46 GMT
Last edited by Kyle Keen (keenerd) - Tuesday, 28 January 2014, 03:44 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Kyle Keen (keenerd)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: performance is much worse than it should be just because the pyc files are not installed alongside the py files. Just compile_all while installing. Otherwise, when a user without root privileges imports markdown or executes the markdown script, the python interpreter won't be able to write the pyc files because of lack of adequate permissions.

The same applies to python2-markdown, but I'm not reporting it separately.


Steps to reproduce:

python -v

import markdown
This task depends upon

Closed by  Kyle Keen (keenerd)
Tuesday, 28 January 2014, 03:44 GMT
Reason for closing:  Fixed
Additional comments about closing:  2.3.1-3
Comment by Kyle Keen (keenerd) - Tuesday, 28 January 2014, 03:17 GMT
"performance is much worse than it should be"

Strong claim, are you sure? I've done a lot of testing with and without pyc/pyo files and there is no noticable difference on modern computers. Pyc files have no affect on performance, only start up time. And then I've never noticed a difference in start up time with any library except for Sympy (the largest purely python library we have).
Comment by Carlos (memeplex) - Tuesday, 28 January 2014, 03:25 GMT
I often use a low-end netbook and then I tend to detect this kind of performance issues that new hardware hides from us. Of course the problem is only at startup. The issue with missing pycs has been pervasive in arch python packages lately. There have been reports for numpy and even the core python package. IMHO the right thing to do is to install pycs alongside pys, given that python offers no way to bytecompile in a directory where the user has write privileges.
Comment by Kyle Keen (keenerd) - Tuesday, 28 January 2014, 03:43 GMT
Numpy is different - the error there was because pyc files existed with the wrong timestamps. If there were no pyc files, numpy would not have any problems. Numpy is also 99% written in C/Fortran libraries, and pyc files would only be able to speed up the 1% that is actually in python.

Anyway, fixed.

Loading...