sbmlteam/moccasin

Tests taking too long & causing Travis builds to fail

Closed this issue · 5 comments

For some reason, Travis builds are failing not because there's an error but because they're timing out. It seems that test execution is taking a ridiculously long time. Need solve.

Looks like the latest auto-build succeed, but it's a problem that tests take almost 30 minutes even on my (fast) desktop.

Speeding up the parser is going to take a more significant effort to examine what's going on. For now, I set up the pytest configuration to use xdist to parallelize the test execution. It now uses 2 processors by default, which halves the test execution time. I chose 2 as a compromise between speed and the impact on a user's computer. (A better way would be to scale the parallelization by how many cores the computer has, but this would be more complicated and I didn't want to spend more time on this right now.)

This is done in commit f4a4e6d.

bgoli commented

A very late note. If you are looking to optimize the parser and don't mind replacing it, I would suggest looking into PLY (http://www.dabeaz.com/ply/) a very well established lex/yacc implementation.

Thanks. I know about PLY, and several others (I explored many). The current system uses PyParsing. It would be too much work to rewrite the parsing system using another framework. I know there are inefficiencies in the current implementation, so the best thing would be to profile what it's doing and seek ways of improving it. Also, the Travis builds didn't used to fail. Something changed dramatically at some point and I'm not sure what.

Travis did some major infrastructure update around a month ago. With new ubuntu default version and major changes in libraries like C++ compiler version. I was hit by this also in some project. Could be related to this. You can specify in the travis file to use the old infrastructure.
Could be related to this.