Forums | Chat | News | Contact Us | Register | PSU Social |
PSU: will it blend?
Forums | Chat | News | Contact Us | Register | PSU Social |
Home | Forum | Chat | Wiki | Social | AGN | PS2 Stats |
|
|
|
Thread Tools | Search this Thread | Display Modes |
2014-01-04, 05:12 PM | [Ignore Me] #1 | ||
Private
|
as the title says I want to pull data from the API FASTER! I am currently trying to pull data quicker
PHP Code:
Any tips? Thanks! Last edited by SecretSquirrel; 2014-01-04 at 05:14 PM. |
||
|
2014-01-07, 05:52 AM | [Ignore Me] #2 | ||
Sergeant
|
Isnt the best way to achieve quicker results to cache the data localy.
Make JSON requests in the background, store the results in your local DB. The your pages access only your local data. One other point to mention is that the API was always "slow" and may be slower at the moment due to the anti DoS stuff SOE have put into place over the weekend. |
||
|
2014-01-07, 10:35 AM | [Ignore Me] #3 | ||
Corporal
|
Storing a cache locally is what i do anyways, also easy on the load, and what you do with the query data. For our teamspeak and currently online i have a 5 minute cache, mainly to ease on the server load filtering the list.
Another tip is specifying your query, using IDs is quicker than searching.
__________________
Get this or an empire themed dynamic sig with your name on it at http://ps2.gilsweb.com/ Belonging to Long Forgotten Soldiers outfit on Miller, Technology IS Might |
||
|
2014-01-22, 10:02 AM | [Ignore Me] #4 | ||
Master Sergeant
|
As mentioned : cache the results!
You might want to try a library - see if CURL can make the request faster. I'm using file_get_contents to retrieve a single file. However, to speed things up in some scripts I run multiple asynchronous queries using curl_multi_exec() |
||
|
|
Bookmarks |
|
|