Need a cache for ucnv_open()

php.internals

Wez Furlong

21 years ago
A number of extensions/functions (strangely, most of the things I work on :-) will need to be able to convert between unicode and arbitrary encodings. It makes a lot of sense to keep some kind of per-request cache (of limited length) to avoid having to load and unload the conversion table on each conversion attempt. Since this cache needs to always be present (to avoid crazy conditional compilation) we either need to put it in zend_unicode.c or put it in ext/unicode and always require it to be statically compiled into php. Thoughts? --Wez.

l0t3k

21 years ago
Wez, zend_unicode.c may be a good bet, since the engine has to deal with various encodings anyway (script, output, runtime) clayton "Wez Furlong" <kingwez@gmail.com> wrote in message news:4e89b4260508130652655bcff2@mail.gmail.com... Since this cache needs to always be present (to avoid crazy conditional compilation) we either need to put it in zend_unicode.c or put it in ext/unicode and always require it to be statically compiled into php. Thoughts? --Wez.

Jani Taskinen

21 years ago
I'd go with zend_unicode.c as you can disable ext/unicode. --Jani On Sat, 13 Aug 2005, Wez Furlong wrote:
> A number of extensions/functions (strangely, most of the things I work > on :-) will need to be able to convert between unicode and arbitrary > encodings. It makes a lot of sense to keep some kind of per-request > cache (of limited length) to avoid having to load and unload the > conversion table on each conversion attempt. > > Since this cache needs to always be present (to avoid crazy > conditional compilation) we either need to put it in zend_unicode.c or > put it in ext/unicode and always require it to be statically compiled > into php. > > Thoughts? > > --Wez. > >
-- Donate @ http://pecl.php.net/wishlist.php/sniper

Andrei Zmievski

21 years ago
zend_unicode.c is the place for it, IMHO. -Andrei On Aug 13, 2005, at 6:52 AM, Wez Furlong wrote: