Discussion:
Impact of SCA on performance?
Yannick
2008-07-28 00:55:00 UTC
Permalink
Hi again,

If I decide to use SCA to provide services from my existing classes,
should I be worried about performances in terms of parsing? Will any
single include of this class file trigger a parsing of my PHPDoc
documentation, or is it going to detect, somehow, that the class has
been called through a local call rather than a web service, and
consequently ignore the parsing?

Thanks,

Yannick
simonslaws-gM/Ye1E23mwN+
2008-07-30 09:33:06 UTC
Permalink
Post by Yannick
Hi again,
If I decide to use SCA to provide services from my existing classes,
should I be worried about performances in terms of parsing? Will any
single include of this class file trigger a parsing of my PHPDoc
documentation, or is it going to detect, somehow, that the class has
been called through a local call rather than a web service, and
consequently ignore the parsing?
Thanks,
Yannick
Hi Yannick

Apols for not being very responsive here. I have of late been spending
most of my time on the Java SCA implementation over in Apache and over
there we are in the middle of trying to get a release out (with all
the fun and games that involves). I won't be able to spend much time
on PHP SCA code changes in the near future but I'll try and stay on
the list and help if I can.

If I remember correctly there is code to detect if the class file
(that represents an SCA component) is being included by a wrapper
script or if it is being called by PHP directly in response to a user
request. The idea behind this is that you may not want to always use
the classes as SCA components and hence don't want to incur the
overhead of the parsing. In the case that you do want to have a class
included in a wrapper file but also act as a service component we
included a "dispatch" method that allowed the ongoing request to be
delegated to some included SCA component. In which case the parsing
will be done. Someone on the list a long time ago wanted to set up his
web server with a stucture something like...

htdocs/
mywrapperscript.php
privatedocs/
myscacomponent.php

and have mywrapperscript.php delgate to myscacomponent.php. This was
the motivation behind the "dispatch" method.

I also have a vague recollection that there is some optimization in
the bindings to detect if the target is a local component but I may
just be imagining it. I'll have to go check.

Regards

Simon

Continue reading on narkive:
Loading...