Spheroman / ThingRanker

a work in progress pairwise thing ranker for simple decision making
http://ranker.jacklucksack.com
3 stars 2 forks source link

responsiveness refactoring #50

Open Spheroman opened 3 months ago

Spheroman commented 3 months ago

we need to adjust the current code to remove redundant calls to mysql, as well as make some logic more consistent and whatnot. An example of this is to have each page check for table id injection from #46 instead of checking within pairing.php and other helper functions. if every page is safe, then we don't need to make any redundant calls.

We should also add a lot more $pdo=nulls to the end of files for clarity and whatnot.

If it's possible to merge sql statements together we should do that as well.

Spheroman commented 3 months ago

https://www.php.net/manual/en/pdo.connections.php

If possible, we should have our PDO connection be persistent to reduce latency further. latency is important for this application as many many calls will be made to it during a typical competition. It would also improve performance on low-power devices such as raspberry pis or aws nano servers.