Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance regression in 0.12 #247

Closed
yanokwa opened this issue Dec 31, 2018 · 1 comment
Closed

Performance regression in 0.12 #247

yanokwa opened this issue Dec 31, 2018 · 1 comment
Assignees

Comments

@yanokwa
Copy link
Contributor

yanokwa commented Dec 31, 2018

xls2xform 0.12.0 takes a lot longer to convert to XML than 0.11.5.

I noticed this problem on this forum topic and to investigate, I set up a local xlsform-server and used the soar.xlsx.zip form.

I then ran a local conversion

cd /home/ubuntu/xlsform/xlsform_env/bin/
time ./xls2xform /home/vagrant/test.xlsx /tmp/test.xml

On pyxform 0.11.5, it took about 1.4 seconds (multiple runs)
On pyxform 0.12.0, it took about 23 seconds (multiple runs)

On a very fast local machine, this change isn't that noticeable (it takes 2 seconds), but on a single-core cloud VPS like the one that runs http://opendatakit.org/xlsform, it pegs the CPU for minutes at a time and results in gateway timeouts.

My guess is that this regression happened with #187.

@MartijnR @ukanga can you reproduce?

@ukanga
Copy link
Contributor

ukanga commented Jan 1, 2019

Let me look into it.

@ukanga ukanga self-assigned this Jan 1, 2019
ukanga added a commit to ukanga/pyxform that referenced this issue Jan 3, 2019
This reduces the time by more than half i.e 46s down to 16s. It is still
4 times more than v0.11.5.

Fix XLSForm#247
ukanga added a commit to ukanga/pyxform that referenced this issue Jan 3, 2019
Returns True on first repeat occurance and caches with lru_cache.

Part fix for XLSForm#247
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants