Re: Function auto-loading
| From: | Stanislav Malyshev | Date: | Mon, 08 Aug 2016 21:54:40 +0000 |
| Subject: | Re: Function auto-loading | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-94956@lists.php.net to get a copy of this message | ||
Hi!
> Of course calling e.g. strpos() should not trigger the auto-loader
> repeatedly - can we cache the information that the auto-loader was
> attempted once during the current script execution? so that e.g. only the
> first call to strpos() triggers the auto-loader?
I think triggering it even once for *every* internal function in the
code may be too much.
> I suppose it would still happen once for every namespace from which
> strpos() gets called, so maybe this optimization doesn't help much.
Exactly. Also, caching stuff assumes static environment. What if it
changes, e.g. autoloader gets different configuration?
--
Stas Malyshev
smalyshev@gmail.com