I have installed the EXACT configuration Web2Py app on MySQL DB with a different email on your machines. Performance still is unacceptable - but it is twice as better than the one on the original ICD10 installation ! I am talking about AVERAGE of 4-6 seconds on the new installation vs. average of 15 -30 seconds on the original (I've checked tens of same queries on both).
I've run several queries DIRECTLY on the MySQL instance on your side. Consistently 0.04-0.08 sec. Very reasonable I'd say. Again - locally on my Mac - ANY query on this configuration - is sub second. I think we can safely say the problem is NOT in my SQL code.
The above plus the fluctuations in performance during the time of day - means that Massimo was probably right - the bottle neck is somewhere between the MySQL and the Web2Py servers. BTW - what is the webserver you guys use - Rocket or something else ?
Now to your question, specifically. As you can check yourself at icd10doc.com: user enters either free text or a specific code in to a search box. Problem of latency is most annoying with free text where it may take 15-60 seconds (?!?) for response. With that being said - even 2-3 seconds response time on a search with a code (not free text) for a disease on an indexed table, when directly on MySQL it is measured in milliseconds and locally is always sub second - still shows there is a problem. The MySQL response to the query is just being parsed by Web2Py into a view, usually with links to other pages.
And here is another issue - when user clicks on one link on page - even though it is a simple query (on an indexed table) which responds with another W2P view- it still may take 2-5 seconds ! Why ?
Please - HELP !
harry | 1156 posts | PythonAnywhere staff | March 23, 2015, 12:35 p.m.