Zend AMF Optimization; Tips and tricks?

I am working on a project that uses PHP to create a “complex” object with lots of links to other objects that reference their parent objects, etc.

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

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

My question is this: can someone give me advice on how serialization works, and how can I optimize the structure of an object to make serialization faster?

+3
source share
3 answers

Switching to JSON will help you with this, as it simplifies caching.

APC will also help, just for the part of the operations cache, and not for storing objects in memory.

How big is this object? Could it be worth it not to send the whole thing? If you are simply dealing with record sets, you can fix this in the interface by downloading only what the user can see or will see in the near future.

+1
source

The default serializer will iterate over each property, if the property is an object, it will iterate each of these objects and their properties until it is done.

Since your object is complex, there are many crunches and many levels of objects that are serialized.

​​ , , Flex.

http://php.net/manual/en/class.serializable.php

0

AMF , . , ActionScript, . RPC . JSON, , AMF. , HTTP-.

0

Source: https://habr.com/ru/post/1777455/


All Articles