Time to retreive full xml
My project is based on full xml.
I noticed that it takes more than 1 second to retreive the informations of each player.
As i'm displaying about 20 profiles, i have to wait more than 20 secondes for my webpage to display.
I'm sure i'm not using the right method, is there a way to optimize that? (i'm using ryzom_character_simplexml())
RE: Time to retreive full xml - Added by nimetu over 6 years ago
cache the xml in database/file and only update when cache_expire is greater than current time (both should be in UTC / unix timestamp)
run (external) cron utility that fetches the expires xml's and updates cache. ofcourse dont forget to check the api server status code (bad key for example ;-)
do it every minute and webpage loads 'instantly'.
RE: Time to retreive full xml - Added by LupusMichaelis over 6 years ago
I don't think. If you bench the serveur, you'll see they are a lag. If you want to improve it, you have to cache datas. but maybe VL can tweak something ? :D
RE: Time to retreive full xml - Added by vl over 6 years ago
You should not request the xml each time a user display your webpage or it'll be insane!
Currently the cache on character is not activated so I do all the slow process on each request :)
I'll add the cache monday and I think it'll be faster but I still don't think it's a good idea to request the xml on each pageview on your website.