Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zend AMF Optimisation; Tips and Tricks?

I am working on a project that uses PHP to create an 'complex' object with lots of references to other objects linking back to their parent objects etc...

The object structure is then serialized by the Zend AMF module and sent over to the flex application.

The problem is that serialization takes a lot of time (+10sec).

My question is thus: can anybody give me tips on how the serialization works and in what way I may be able to optimize the object structure in order to make serialization run faster?

like image 561
Goldfrapper Avatar asked Jun 10 '26 13:06

Goldfrapper


1 Answers

Switching to JSON will help a great deal with this, as it allows easier caching.

APC will also help, just for the opcode-cache part, not for storing objects in memory.

How big is this object exactly? Could it be worth it not sending the entire thing? If you're just dealing with recordsets, you might be able to fix it in the frontend by only downloading only what the user can see, or will see in the near future.

like image 81
Evert Avatar answered Jun 13 '26 02:06

Evert