dotMobimobiThinkingmobiForgemobiReadyDeviceAtlasfind.mobigoMobi

Posted by pboese 1 year 22 weeks ago

pic
 pboese
mobiForge Newbie
Posts: 8
Joined: 1 year ago
[offline]

Hey,

just bought a licence of DeviceAtlas and tried the sample that comes with the PHP API. I set up memcached with the default config that comes with debian lenny:

/usr/bin/memcached -m 64 -p 11211 -u nobody -l 127.0.0.1

Now when I run the unmodified sample script, it takes about 150ms w/o memcache enabled:

http://uap.gjuce.com/?nocache

But around 300ms with memcache enabled:

http://uap.gjuce.com/

how's that possible? Did I miss something configuration wise?

Kind regards, Pelle.

Posted by pboese 1 year ago

pic
 pboese
mobiForge Newbie
Posts: 8
Joined: 1 year ago
[offline]

Oh and btw, I'm using DA_php_1.3.1.zip with PHP 5.2.6 and apache2. Suhosin and eAccelerator enabled.

http://www.gjuce.com/

Posted by adrian.hopebailie 1 year ago

pic
 adrian.hopebailie
Mobile Expert
Posts: 51
Joined: 2 years ago
[offline]

Hi,

The long and short of it is that PHP's JSON decode function is faster than deserializing our Data from the standard PHP serialized form.

Memcache is very inefficient when you have large objects, which our data has become. Each time the php memcached client fetches your cached data it has to deserialize it as it only stores strings.

I would recommend you have a look at the new API which has numerous levels of caching to try and prevent the need to even load up the JSON file if possible.

*edit by daniel.hunt* The DA Beta API has been taken offline temporarily. Use the 1.3.x ones instead http://deviceatlas.com/downloads

This is still a beta preview and is subject to change a little but we are currently working to get it ready for official release.

Adrian Hope-Bailie
dotMobi

Posted by pboese 1 year ago

pic
 pboese
mobiForge Newbie
Posts: 8
Joined: 1 year ago
[offline]

Hi Adrian,

thanks a lot! The new API is really lovely :)

Cheers, Pelle.

http://www.gjuce.com/