Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

Performance: Saving changes to a learning resource can take 15-20 seconds #519

Open
pdpinch opened this issue Aug 14, 2015 · 4 comments
Open

Comments

@pdpinch
Copy link
Member

pdpinch commented Aug 14, 2015

On lore-ci right now, it's taking me 15-20 seconds to save changes in the learning resource panel.

There's also no user feedback while the save is in progress, so it's tempting to click the save button multiple times, probably leading to issues like #517

@carsongee
Copy link
Contributor

So looking at this just with a browser, I see some crazy stuff happening on the panel:
image
It looks like a lot of the performance may be the javascript paging through the entire static asset set before rendering that panel. In the case of this screenshot, that appears to have caused a 503 when trying to save the resource, and a second attempt resulted in a successful save.

Looking at the SQL DB, the disk didn't even get hit, and we only used 25% of available DB resources:
image
The memory on the dyno did double up to 750MiB which is above our 512 max and may be why the 503 came in (from the Heroku LB).

I don't have ES perf stats, but since the assets are pure DB I don't think it is involved.

@carsongee
Copy link
Contributor

So, looking at that screenshot, I think the bigger issue is that we are patching with 4.6 MiB of data (which is the size of the XML for that LR), instead of just sending the description and terms. I think we just need to strip out that item in the PATCH.

@pdpinch pdpinch added this to the August 22, 2015 milestone Aug 17, 2015
@pdpinch
Copy link
Member Author

pdpinch commented Aug 17, 2015

Three things to fix

@noisecapella
Copy link
Contributor

This isn't fully solved, I can still reliably take 4 seconds to save a learning resource on my local machine. I investigated and the underlying code updates the entire row in the database, not just the terms and description, the bulk of which is the content xml. One solution is to implement a custom update method on LearningResourceSerializer which does a more focused update.

@noisecapella noisecapella reopened this Sep 23, 2015
@Ferdi Ferdi added the Backlog label Apr 19, 2016
@noisecapella noisecapella removed their assignment Jun 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants