hashplan / calendar

Apache License 2.0
0 stars 0 forks source link

load more on scroll and general site speed #50

Open hashplan opened 9 years ago

hashplan commented 9 years ago

Roma, The load on scrolling seems to be super slow. I have to wait 5-10 seconds for more events to load when I scroll all the way to the bottom. Is there a way to optimize it?

Tried in Chrome and Firefox using user at user . com pw newpassword

image

Also seems like the entire site is super slow. Not sure if the server is lagging and this will get better later and fix itself.

Here is what loaded on my phone when using the same login as above. No formatting, no set location, nothing but a few random events on the page. Also interesting to note that it loaded hashplans.com/user/events/events_list.

screenshot_2014-09-18-23-28-29

romasolot commented 9 years ago

1) I think this is because of crawler's work. I used to change the run time several times during work on it. Currently crawler is run each Thursday at 2:00 and works about 8-10 hours as I mentioned before. Anyway, I'll review queries and work on their optimization.

2) I closed this page (hashplans.com/user/events/events_list) for direct viewing.

romasolot commented 9 years ago

I executed minor optimization of the database. But the site will be slow during crawler's work. This can be resolved by replication of the databases. Think this can be done once we approach releasing to live. Here is the order: 1) 2 RDS databases are deployed 1 - is master, where data will be inserted/updated 2 - is slave - from where the data will be selected 2) configure the current server for such mode 3) we create one more instance for the parser, which will be run only during parser's work (saving money) This scheme is easily scalable and will provide non-stop service operation.

hashplan commented 9 years ago

Roma, above sounds good for when we are ready.

Would adding indexes to events and venues tables slow down the crawler updates until we implement the above replication?

romasolot commented 9 years ago

Hi Stas

The difference in processing will be about 1 hour (with indices and without them). I'd like to try to move the logic of the stored procedure to php. I assume this should decrease general time of parsing. Will let you know the results.