Benchmark import times
moorepants opened this issue · 7 comments
We just had a complaint on the SymPy mailing list about rising import times.
The complaint came from importing sympy on a smart phone which takes ~10 seconds. This is significantly longer than it takes to import on my laptop ~0.5s.
BTW, which mobile OS does that?
We need to figure out if asv
imports the benchmarked project earlier than the first import statement in any benchmarks. If it doesn't we should be able to make a simple benchmark for it (given it is run first...).
I tried it and it seems like the module is imported previous to the actual benchmark run. It takes about 0.5s for a cold import on my machine and when I try to build a benchmark around the import it reports something in the microseconds. Not sure how to fix it yet...
In that case maybe we should patch asv
to gather import times and make that data (optionally) available, maybe as a config file option? e.g. "benchmark_import": false
, that data will essentially be gathered for free
Since it looks as if whole SymPy was recompiled on each import:
https://groups.google.com/forum/#!topic/sympy/H8uAInEheIQ
I am closing this issue for now. Feel free to reopen if the issue reappears.