> I have been using cherrypy + tubogears framework for around 4 years
> front ending a product.
> Recently, I have been assigned with the task for cloud migration &
> load testing.
> I have noticed that sometimes main URL which returns 200 topmost
> records from MySQL DB performs inconsistently.
> URL performs following steps:
> Step 1: DB Query for 200 records. (~0.1 sec)
> Step 2: FOR loop over 200 records from STEP 1 & do some changes to the
> data for presentation.
> Performance of this step is inconsistent. As user load
> picks up, the performance degrades.
Your statistics don't show varying times for 200 records; each of these
queries is for a different size. The time for 200 results is roughly 4
times as long as the time for 57 results, so that doesn't seem
particularly outrageous. However, it's hard for me to imagine what
would take 17 seconds to display 200 results. Are you doing more
database queries for each row?
> On 2018-09-28, at 18:43, abhishek <[hidden email]> wrote:
> ...do some changes to the data for presentation...
It sounds like this part is horribly inefficient. Can you show the code which does these 'changes'? Are you using membership tests in lists instead of sets/dict, perhaps? Are you creating very heavy objects? Deeply nested loops?
"You can't actually make computers run faster, you can only make them do less." - RiderOfGiraffes