Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi for PHP/Library/PHP    [ Add a report in this area ]  
Report #:  111799   Status: Open
RPCL performance issues
Project:  HTML5 Builder Build #:  5.1.167.137
Version:    5.0 Submitted By:   Michael Ainsworth
Report Type:  Feature Specification issue Date Reported:  1/8/2013 2:28:03 PM
Severity:    Serious / Highly visible problem Last Updated: 1/9/2013 5:34:32 PM
Platform:    All platforms Internal Tracking #:   4987
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
RPCL is very slow. I think there are several reasons why this is the case:

* Lots of objects are being serialised in the global $_SESSION variable.
* Every time something needs to be processed server-side (e.g., a button click), everything is sent to the server, even if none of the data relates to the request.
* Server-side processing events (e.g., a button click) reconstruct the user interface "in memory" (for example, a "Button" component is re-instantiated, along with all it's properties and related components).
* The dynamic production of CSS and JavaScript using the "css=1" and "js=1" query string parameters are also slower than one would expect, due to the above.
* The vast majority of requests use the HTTP "POST" request method, which the HTTP/1.1 specification says must not be cached by either proxies or user agents, so HTTP caching is very restricted.

I have a list of other performance issues, for which I can provide more information if you are interested.
Steps to Reproduce:
None
Workarounds
None
Attachment
None
Comments

Michael Ainsworth at 1/9/2013 7:53:27 PM -
I've subsequently run xdebug profiling to work out which functions were taking longest to complete, and it seems that it is mostly the session handling. E.g., when RPCL calls session_start() and RPCL_Shutdown(), both of which involve serializing/unserializing session variables as far as I can tell.

Tomohiro Takahashi at 1/9/2013 8:49:48 PM -
> ... when RPCL calls session_start() and RPCL_Shutdown(), both of which involve serializing/unserializing session variables ...
This is known issue, because RPCL(and previous VCL for PHP) implements own (de)serialization without using built-in (de)serialization of PHP itself.

Please see this page.
[This patch improves serialization performance up to 6x - ID: 3072647]
http://sourceforge.net/tracker/?func=detail&aid=3072647&group_id=189419&atid=929252

Server Response from: ETNACODE01