Re: I18n Performance
There were an activity in Avalon scratchpad a while ago on the i18n resources abstractization, but AFAIK it was never finished. The idea was to have a Bundle interface and use any implementation you like: a property file, XML file or a database. Also, you could use different factories for your bundles, say use a property file that is loaded from a DB, JNDI and so on. Current implementation of XMLResourceBundle is the first implementation from the Avalon scratchpad. I know that the approach in i18n transformer is very limiting, but since nobody complained about it before (except for the superfluous logging) I've never care about it. Btw, I don't think that replacing XMLResourceBundle with a HashMap will improve perfomance much in the long run, because the values are stored in a HashMap on the first use, so there should be no much difference. I've redesigned i18n samples and now working on the documentation to attract more people to use it and therefore more people will be interested to improve it. But the time is everyone's problem... Konstantin - Original Message - From: Torsten Curdt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 21, 2002 10:44 PM Subject: Re: I18n Performance But IIRC the I18nTransformer is still not cachable - is he? doh! Yes, you're correct. (I'm using my own bastardization of the standard I18nTransformer over here. Cacheable + very fast since i replaced the XMLResoruceBundles with some hashmaps. Its on my list to package up + donate back, time is just very very slim :( Same here *sigh* Ages ago I proposed some changes on having a more abstract resource bundle (we'd like serve our from db) which has a last modified stamp so we can easily implement cacheable... but time you know ;-) This would be a major(!) improvement... we haven't yet (and wouldn't) use the i18n transformer under the current circumstances. My 2 cents -- Torsten - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I18n Performance
Hi Nicola, working with WebSphereApplicationDeveloper my experience was, that the value in web.xml helps to avoid WebSphere logs which decreases performance. Best regards - Volker - -Original Message- From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 21. Mai 2002 18:35 To: [EMAIL PROTECTED] Subject: Re: I18n Performance From: Michael Zehrer [EMAIL PROTECTED] I'm using I18n just for simple translations, no number, date, currency formatting and just one substitution. My log level is already ERROR. So nothing real special here. If I take out the I18n transformation, everything is quite ok, if it's in the cpu load is very high after a little while and pipeline processing takes very long. The machine is a Sun Netra X1 (500Mhz/2GB RAM) Sorry if I'm being pedantic, but did you set your log-level in the logkit.xconf file? The one in web.xml is used only at startup and when logkit.xconf is absent. -- Nicola Ken Barozzi [EMAIL PROTECTED] - verba volant, scripta manent - (discussions get forgotten, just code remains) - - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18n Performance
On Wednesday 22 May 2002 03:24 am, Konstantin Piroumian wrote: Btw, I don't think that replacing XMLResourceBundle with a HashMap will improve perfomance much in the long run, because the values are stored in a HashMap on the first use, so there should be no much difference. Agreeed. One of our main problems was the first use though. In development it would take a minute or two to fully translate our menu file (large chunk-o-javascript) with the XMLResourceBundle based approach. While some of the abstractions of the XMLResourceBundle are nice, it isn't really neccessary to parse an XPath each time a value is retrieved. I parse the i18n dictionaries at startup and store the key/values in an unsynchronized hashmap and the transformer flies now. Perhaps we can abstract out an interface for the I18nTransformer to talk to a catalogue/dictionary source so the XMLResourceBundle usage is optional? I'd love for my changes to the I18nTransformer to be able to make it back to the main trunk. -pete -- peter royal - [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18n Performance
From: Peter Royal [EMAIL PROTECTED] On Wednesday 22 May 2002 03:24 am, Konstantin Piroumian wrote: Btw, I don't think that replacing XMLResourceBundle with a HashMap will improve perfomance much in the long run, because the values are stored in a HashMap on the first use, so there should be no much difference. Agreeed. One of our main problems was the first use though. In development it would take a minute or two to fully translate our menu file (large chunk-o-javascript) with the XMLResourceBundle based approach. While some of the abstractions of the XMLResourceBundle are nice, it isn't really neccessary to parse an XPath each time a value is retrieved. As I've said, really cool abstractions (a Bundle and not XMLResourceBundle) were never been finalized and remained in Avalon scratchpad. XMLResourceBundle is used in a little unusual way now: it behaves just like an XML property file, while it could provide an XML content using XPath expressions and not the current hard-coded one. I parse the i18n dictionaries at startup and store the key/values in an unsynchronized hashmap and the transformer flies now. Did you use the 'cache-at-startup' configuration parameter? I was sure that it was for exactly the same thing, though my information can be our of date, hadn't a look at it for a long time. Also, I can remember some Hashtables there, they should be replaced by HashMaps too. Perhaps we can abstract out an interface for the I18nTransformer to talk to a catalogue/dictionary source so the XMLResourceBundle usage is optional? I'd love for my changes to the I18nTransformer to be able to make it back to the main trunk. Yes, that would be fine! I think that the best thing would be to separate dictionary handling from the transformer at all and use either a custom source, say: transform src=i18n:db:/catalogue/messages / or transform src=i18n:xml:/catalogue/messages /, or configure it like an SQL connection and use a short name of it for the transformer configuration/parameterization: transformer ... bundle-factoryxml/bundle-factory /transformer or something like that. What do you think? I'd also recommend you to look at the i18n stuff in the Avalon scratchpad. Konstantin P.S. Unfortunately, I can help only with comments/suggestions for now because of (as usual) a limited time. -pete -- peter royal - [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18n Performance
On Wednesday 22 May 2002 09:08 am, Konstantin Piroumian wrote: As I've said, really cool abstractions (a Bundle and not XMLResourceBundle) were never been finalized and remained in Avalon scratchpad. Right, I looked at it and it was more complex than I was needing at the time. Did you use the 'cache-at-startup' configuration parameter? I was sure that it was for exactly the same thing, though my information can be our of date, hadn't a look at it for a long time. Also, I can remember some Hashtables there, they should be replaced by HashMaps too. Yes, I did. It just moves the speed hit around a bit :) Also due to how we use the I18nTransformer, we pass our content through multiple times (2-3) with the first stage generating lots of misses, also expensive time-wise. Yes, that would be fine! I think that the best thing would be to separate dictionary handling from the transformer at all and use either a custom source, say: transform src=i18n:db:/catalogue/messages / or transform src=i18n:xml:/catalogue/messages /, or configure it like an SQL connection and use a short name of it for the transformer configuration/parameterization: transformer ... bundle-factoryxml/bundle-factory /transformer or something like that. What do you think? I'd also recommend you to look at the i18n stuff in the Avalon scratchpad. That sounds very good. The Excalibur Bundle pieces would be one example of a factory. P.S. Unfortunately, I can help only with comments/suggestions for now because of (as usual) a limited time. me too. this is all going on my TODO tho :) -pete -- peter royal - [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18n Performance
i18n transformer output too much data into logs, so changing the log level from DEBUG to something else should help a lot. Can you provide more info on what is the cause? Are you using number, date, currency formatting? Are you using param substitution? The more info you'll provide the more we would help you. Konstantin - Original Message - From: Michael Zehrer [EMAIL PROTECTED] To: Cocoon-Users (E-Mail) [EMAIL PROTECTED] Sent: Tuesday, May 21, 2002 7:18 PM Subject: I18n Performance Hi List, I experience very bad performance under high load using the I18n Transformer, are there any tips for performance improving oder anybody know about an alternative? Cheers, Michael - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I18n Performance
I'm using I18n just for simple translations, no number, date, currency formatting and just one substitution. My log level is already ERROR. So nothing real special here. If I take out the I18n transformation, everything is quite ok, if it's in the cpu load is very high after a little while and pipeline processing takes very long. The machine is a Sun Netra X1 (500Mhz/2GB RAM) Michael -Ursprüngliche Nachricht- Von: Konstantin Piroumian [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 21. Mai 2002 17:26 An: [EMAIL PROTECTED] Betreff: Re: I18n Performance i18n transformer output too much data into logs, so changing the log level from DEBUG to something else should help a lot. Can you provide more info on what is the cause? Are you using number, date, currency formatting? Are you using param substitution? The more info you'll provide the more we would help you. Konstantin - Original Message - From: Michael Zehrer [EMAIL PROTECTED] To: Cocoon-Users (E-Mail) [EMAIL PROTECTED] Sent: Tuesday, May 21, 2002 7:18 PM Subject: I18n Performance Hi List, I experience very bad performance under high load using the I18n Transformer, are there any tips for performance improving oder anybody know about an alternative? Cheers, Michael - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18n Performance
From: Michael Zehrer [EMAIL PROTECTED] I'm using I18n just for simple translations, no number, date, currency formatting and just one substitution. My log level is already ERROR. So nothing real special here. If I take out the I18n transformation, everything is quite ok, if it's in the cpu load is very high after a little while and pipeline processing takes very long. The machine is a Sun Netra X1 (500Mhz/2GB RAM) Sorry if I'm being pedantic, but did you set your log-level in the logkit.xconf file? The one in web.xml is used only at startup and when logkit.xconf is absent. -- Nicola Ken Barozzi [EMAIL PROTECTED] - verba volant, scripta manent - (discussions get forgotten, just code remains) - - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18n Performance
On Tuesday 21 May 2002 11:50 am, Michael Zehrer wrote: I'm using I18n just for simple translations, no number, date, currency formatting and just one substitution. My log level is already ERROR. So nothing real special here. If I take out the I18n transformation, everything is quite ok, if it's in the cpu load is very high after a little while and pipeline processing takes very long. It is very slow. I would recommend optimizing your pipelines for cachability to the I18nTransformer is not executed on each request. -pete -- peter royal - [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18n Performance
On Tuesday 21 May 2002 19:02, Peter Royal wrote: On Tuesday 21 May 2002 11:50 am, Michael Zehrer wrote: I'm using I18n just for simple translations, no number, date, currency formatting and just one substitution. My log level is already ERROR. So nothing real special here. If I take out the I18n transformation, everything is quite ok, if it's in the cpu load is very high after a little while and pipeline processing takes very long. It is very slow. I would recommend optimizing your pipelines for cachability to the I18nTransformer is not executed on each request. But IIRC the I18nTransformer is still not cachable - is he? -- Torsten - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18n Performance
But IIRC the I18nTransformer is still not cachable - is he? doh! Yes, you're correct. (I'm using my own bastardization of the standard I18nTransformer over here. Cacheable + very fast since i replaced the XMLResoruceBundles with some hashmaps. Its on my list to package up + donate back, time is just very very slim :( Same here *sigh* Ages ago I proposed some changes on having a more abstract resource bundle (we'd like serve our from db) which has a last modified stamp so we can easily implement cacheable... but time you know ;-) This would be a major(!) improvement... we haven't yet (and wouldn't) use the i18n transformer under the current circumstances. My 2 cents -- Torsten - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18n Performance
How would I do this? Michael Am Die, 2002-05-21 um 19.02 schrieb Peter Royal: On Tuesday 21 May 2002 11:50 am, Michael Zehrer wrote: I'm using I18n just for simple translations, no number, date, currency formatting and just one substitution. My log level is already ERROR. So nothing real special here. If I take out the I18n transformation, everything is quite ok, if it's in the cpu load is very high after a little while and pipeline processing takes very long. It is very slow. I would recommend optimizing your pipelines for cachability to the I18nTransformer is not executed on each request. -pete -- peter royal - [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mit freundlichen Grüßen Michael Zehrer OPTIMAL SYSTEMS Gesellschaft für innovative Computertechnologien mbH Cicerostraße 26, 10709 Berlin Tel.: 030 - 8 95 70 80 Fax:030 - 8 95 70 88 88 E-Mail: [EMAIL PROTECTED] Web:www.optimal-systems.de, www.epa.de, www.optimal-AS.de - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18n Performance
On Tuesday 21 May 2002 02:44 pm, Torsten Curdt wrote: Ages ago I proposed some changes on having a more abstract resource bundle (we'd like serve our from db) which has a last modified stamp so we can easily implement cacheable... but time you know ;-) I have 1/2 that :) We have bundles on disk that are our system translations and bundles in the DB that are user-defined that layer on top of the system ones. I haven't implemented last-modified support yet since I don't need it, but it wouldn't be bad. This would be a major(!) improvement... we haven't yet (and wouldn't) use the i18n transformer under the current circumstances. I'll try and package it up sooner :) -pete -- peter royal - [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I18n Performance
I think it would be swell if any transformer was cacheable, and the cache was controllable from the sitemap; e.g. SQLTransformer. -Original Message- From: Peter Royal [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 3:15 PM To: [EMAIL PROTECTED] Subject: Re: I18n Performance On Tuesday 21 May 2002 02:44 pm, Torsten Curdt wrote: Ages ago I proposed some changes on having a more abstract resource bundle (we'd like serve our from db) which has a last modified stamp so we can easily implement cacheable... but time you know ;-) I have 1/2 that :) We have bundles on disk that are our system translations and bundles in the DB that are user-defined that layer on top of the system ones. I haven't implemented last-modified support yet since I don't need it, but it wouldn't be bad. This would be a major(!) improvement... we haven't yet (and wouldn't) use the i18n transformer under the current circumstances. I'll try and package it up sooner :) -pete -- peter royal - [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]