* 'feature/pro_user_flag' of https://github.com/remy/jsbin: (23 commits)
Adding TODO
Adding explaination of req.user and req.session.user
Using request.session.user not request.user
Updating route to set pro, doesn't require username now
Using current user to setPro rather than url param
Adding setPro variable, will be used later
Updating sessionHandler.setProAccount
Removing console.log
Ammending mysql to use query over run
Adding example 'Pro Feature'
Implementing setProAccount for mysql db
Adding setProAccount method to file db
Testing console logs
Adding pro data for index render
Adding pro to the request.user obj
Adding setProAccount method
Visual indicator of pro account to login box
Adding test router handler
Adding setProUser method
Adding DB update scripts
...
Conflicts:
lib/db/mysql.js
lib/db/sql_templates.json
lib/store.js
views/index.html
This solution is obviously a hack, and doesn't provide the detected
content, but gets the history working again to browse. Something's
wrong with the innodb tables and causes the database to hang (looking
for help here!).
Ref #333
The old code would make one query for all the urls and revisions, then
loop and individual query each bin. If the user has 100+ bins, then it
gets slow and expensive because we can't group these queries together.
I've changed this so that the query simply joins the owners and sandbox
table, so instead of *just* getting the url and revision as previously,
we're now getting all the data in one request. I've also removed the
sorting as this happens entirely in the code.
The query, live for my own homepage is 1.13 seconds. I'm hoping
therefore the sum change of this update will reduce the 24 seconds down
to 1-2 seconds.
One additional change I'd like would be to only make the request for
the `/list` page if the user really goes there, or perhaps hovers over
their home link - as a preemptive request - so we're not always making
the request for their home urls.