LynxMasters / lynxmasters-ui

0 stars 0 forks source link

High CPU usage when rendering profile page #67

Closed namontalbano closed 5 years ago

ianarsenault commented 6 years ago

I'm thinking we should in fact be breaking up the calls between components instead of grabbing everything at once when the user doesn't see everything at once.

We should load only what we need when we need it, and limit the size of the return request. I think its 100 currently? We should probably limit it to 25 (with the request returning pages? not sure if this is specified in the returns - I'll have to look), and work on figuring out how to make requests for the next 25 when user hits certain point.

So when user clicks on twitter tab, and component is created or made "visible" we request the twitter feed then. We can use a loading animation like the link accounts page while we sync that request.

Just thinking out loud.

namontalbano commented 6 years ago

i did try limiting the calls to 25 but it made no difference. So then i tested the actual sites (reddit, twitter) and my cpu usage spiked to like 70%. However, i like your idea to load the data when the user clicks on the tab, seems like a reasonable solution to the problem.

ianarsenault commented 6 years ago

Can this get closed out since the most recent changes?

namontalbano commented 6 years ago

Still an issue, i know how we can resolve it but, will take some time. I don't think we can accomplish this before presentation.

ianarsenault commented 6 years ago

No worries, this is something we can improve later on

namontalbano commented 6 years ago

Fixed the issue by redesigning the profile. Did not commit the changes, lmk what you guys think. image

namontalbano commented 6 years ago

image

namontalbano commented 6 years ago

Twitch streams are causing high cpu usage now.