Topic: XAJAX cacheable

Hi, I am using XAJAX for a long time, at the moment I use it to drive a interactive web GUI, backed by a Cobol applikation, communicating over a Socket Connection. We profiled the PHP Applikation and noticed that the initialisation of XAJAX including the registering of the functions consumes about 150msec.  Trying to cache the xajax object failed. Further analysis showed that during the instantiation of xajax the _POST and _GET are processed. A similar observation can be read from the http://community.xajaxproject.org/viewt … p?id=5749, the last entry by csonderegger. Too bad nobody answered on that thread.

I request a change in XAJAX, so that the object can be cached. The actual reading of _POST and _GET should be done in processRequest().

Thx in advance
Monika

Re: XAJAX cacheable

Hi Monika,

this is an interesting request. We already did some tests and cached xajax via memcache/xcache, but you'r right with the parsing of POST/GET vars. We'll discuss that soon.

To reduce the parsing time you can (in 0.5beta4++) 'compile' all xajax files into one big PHP file (xajax_AIO.inc.php). That reduces the number of includes and is a bit faster on the most servers. Are you using any optcode-caches?

Re: XAJAX cacheable

Hi,

I just wanted to add my own feature request but found the same wish posted by monika :-)

We noticed a little bottleneck, every xajax-request needs 1.6 seconds to be processed (the "register"-method seems to be too slow), thats too much in my oppinion for high quality sites.
I also tried to cache the xajax-object within memcache but had no luck after all.

So please add memcache-support to the xajax-core (method with memcache-instance as parameter for example).

Best regards
Marcus

Re: XAJAX cacheable

Hi Marcus,

I'll keep that definitively in mind, but 1.6sec is *really* alot of time. How many functions are you registering? I know that you'r using OOP, is your object instantiation slow too?

Re: XAJAX cacheable

And they said COBOL was dead!

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: XAJAX cacheable

@q_no: 3 methods are registered (your upload-extension)... as soon as I remove the registration everything speeds up (but doesn't work any longer *g*)
yes, we use a complex OOP construct, thats right... but we optimized it very well and already use caching (xcache) for other purposes - our speed tracker gives me values around "0.0something" up to 20 milliseconds for other parts of our website... object instantiation within our framework doesn't seem to be the reason...

regards
marcus

Re: XAJAX cacheable

hm... you say my upload extension slows everything down? Go away and blame someone else! tongue

I guess your code hasn't changed much since the last file you sent me. I'll take a look at it soon - can't believe that 3 functions are slowing everything down that much...

Re: XAJAX cacheable

In addition to cheops' issue:

He solved the issue using the xajax_AIO.inc.php file - the xajax test suite can 'compile' all xajax include files into one big file (all-in-one) and strips all debug codes, whitespaces & comments. That *can* increase the performance on some systems. Normally opt-code caches like xcache,apc,.. take care of that, since they store the bytecode of a compiled file in memory until the files changes. We recommend to use the AOI file only on production servers, since it doesn't contain any debug code.

Feel free to give it a shot and please let us know if you recognize any improvements or not smile