newslynx / opportunities

A garden of NewsLynx futures
1 stars 0 forks source link

Investigate slow loading times #123

Open mhkeller opened 8 years ago

mhkeller commented 8 years ago

On a medium EC2 instance the articles page is particularly slow to load. Once things are stable, look into where in the pipeline this is happening and optimize.

Slated for late October to investigate.

mhkeller commented 8 years ago

CPU usage on the box is not spiking very high but usage reports will be important to see if this is running into a limitation of the box or if part of the process could be more efficient.

Also to look at will be if the same slowness occurs when using the Electron app, which would mean 1) less work on the EC2 box, 2) a powerful computer running the app.

abelsonlive commented 8 years ago

does this happen every time or only on initial load of a new user? if the comparisons have never been generated, they will be created when you hit the comparisons API for the first time, which might explain the slowness. for all subsequent requests, they should be grabbing data from the redis cache (with a TTL of 1 day).

mhkeller commented 8 years ago

Just clocked the approval river with no pending events loading after 5s. Articles page loading after 6s. Both as not-first-time loads. I'm going to go through the app and see where I can change things. Firefox has some fancy new tools for speed testing. This would definitely help but is a bigger lift: https://github.com/newslynx/opportunities/issues/25 So I might start working on that on a branch.