hi Arvind!

Yes, to get rid of TSRMLS_FETCH is a very good thing as it is horribly
slow (as you noticed). However it can't be done in 5.3 as it will
break the ABI.

About the patch itself, as it will break ABI anyway, I would go wit
the solution 1) only. That's cleaner and consistent with what we
usually do.

thanks for your work :)

On Mon, Nov 30, 2009 at 2:32 PM, Arvind Srinivasan <[email protected]> wrote:
> When running a benchmarking workload on PHP that was configured with
> multi-threading support (--enable-maintainer-zts) I noticed that
> pthread_get_specific is invoked many times during the processing of a
> request. PHP code invokes TSRMLS_FETCH() (which ends up invoking
> ts_resource_ex) in a number of places.
> (1) If the number of occurrences of the API to be modified are
> relatively small, then make the change directly.
> e.g.
> -int fcgi_accept_request(fcgi_request *req);
> -int fcgi_finish_request(fcgi_request *req, int force_close);
> +int fcgi_accept_request(fcgi_request *req TSRMLS_DC);
> +int fcgi_finish_request(fcgi_request *req, int force_close TSRMLS_DC);

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to