Slow loading times when translation

Author Message

Martin Leblanc

Tuesday 09 November 2004 4:07:10 am

I have problems with the ts translator. The website has extremely slow loading time (up to 3 minutes) in the other languages than english. I've think that the .ts-file is loaded too many times and therefore causes the slowdown. I have updated the .ts-files with ezlupdate and there not missing any words and there isn't any obsoleted strings. I don't know how to solve this problem. The debug information is shown below:

 Accumulator	 Elapsed	 Percent	 Count	 Average
ini_load				
Load cache	0.0182 sec	0.0182%	5	0.0036 sec
Mysql Total				
Mysql_queries	0.0386 sec	0.0387%	15	0.0026 sec
Looping result	0.0043 sec	0.0043%	14	0.0003 sec
Template Total	92.8343 sec	93.1%	4	23.2086 sec
Template load	0.3297 sec	0.3306%	4	0.0824 sec
Template parser: create text elements	0.0431 sec	0.0433%	14	0.0031 sec
Template parser: remove whitespace	0.0135 sec	0.0135%	14	0.0010 sec
Template parser: construct tree	0.2228 sec	0.2234%	14	0.0159 sec
Template load and register function	0.0077 sec	0.0077%	7	0.0011 sec
Template processing	92.5033 sec	92.7624%	3	30.8344 sec
override				
Cache load	2.3576 sec	2.3642%	30	0.0786 sec
Matching rules	0.0071 sec	0.0071%	12	0.0006 sec
TS translator				
TS init	96.0561 sec	96.3251%	19	5.0556 sec
TS load	95.7846 sec	96.0529%	38	2.5206 sec
class_abstraction				
Instantiating content class attribute	0.0077 sec	0.0077%	20	0.0004 sec
General				
INI string conversion	0.0062 sec	0.0063%	18	0.0003 sec
String conversion	0.2695 sec	0.2702%	56	0.0048 sec
String conversion w/ mbstring	0.2596 sec	0.2603%	56	0.0046 sec
Total script time:	99.7207 sec	

Martin Leblanc

View this in Firefox: www.biocandy.dk/test.html

http://www.opensystems.dk
http://www.site-camp.net

Ole Morten Halvorsen

Tuesday 09 November 2004 4:48:49 am

Hello,

- Do you have mbstring support in PHP?
- Is the site just as slow on the second reload? The translation stuff will be cached, so you should only notice slowdowns on the first reload after installation or after a complete removal of cache.

In 3.5 however, eZ publish is capable of using PHP's XML parser if available. This makes parsing of .ts files _much_ faster. Have a look here: http://ez.no/community/blog/faster_xml

Ole M.

Senior Software Engineer - Vision with Technology

http://www.visionwt.com
http://www.omh.cc
http://www.twitter.com/omh

eZ Certified Developer
http://ez.no/certification/verify/358441
http://ez.no/certification/verify/272578

Martin Leblanc

Tuesday 09 November 2004 5:08:33 am

- Do you have mbstring support in PHP?

Yes.

-----------------

- Is the site just as slow on the second reload? The translation stuff will be cached, so you should only notice slowdowns on the first reload after installation or after a complete removal of cache.

Yes, it is just as slow the second time. The whole site is working fine except for an extension which generates some pages used as an installation for some software. It is not possible to use cache in this case because the pages need to be unique everytime.

I'm am aware of the .ts file in the "extension/Myextension/translations/" and it's fully translated and working perfect in Linguist.

-----------------

- In 3.5 however, eZ publish is capable of using PHP's XML parser if available. This makes parsing of .ts files _much_ faster. Have a look here: http://ez.no/community/blog/faster_xml

I can't wait...

Martin Leblanc

View this in Firefox: www.biocandy.dk/test.html

http://www.opensystems.dk
http://www.site-camp.net

Martin Leblanc

Wednesday 10 November 2004 4:41:10 am

I have found a solution for my problem: Simply diable texttranslation in the site.ini. When there no i18n, it's working fine, except the texts isn't translated :-(. Instead of using i18n for text translation I use a "translation object" for the texts and translates that object from the admin interface. Then I fetch the content of translation objects from the templates when needed.

Martin Leblanc

View this in Firefox: www.biocandy.dk/test.html

http://www.opensystems.dk
http://www.site-camp.net

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 07:23:49
Script start
Timing: Jan 31 2025 07:23:49
Module start 'layout'
Timing: Jan 31 2025 07:23:49
Module start 'content'
Timing: Jan 31 2025 07:23:50
Module end 'content'
Timing: Jan 31 2025 07:23:50
Script end

Main resources:

Total runtime1.0984 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.1563151.2109
Module start 'layout' 0.00490.0029 739.367236.6484
Module start 'content' 0.00771.0899 776.0156946.4453
Module end 'content' 1.09760.0008 1,722.460915.8438
Script end 1.0984  1,738.3047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2806160.0002
Check MTime0.00130.1164160.0001
Mysql Total
Database connection0.00090.083110.0009
Mysqli_queries1.039594.6367600.0173
Looping result0.00060.0533580.0000
Template Total1.067297.220.5336
Template load0.00180.160620.0009
Template processing1.065496.995520.5327
Template load and register function0.00140.130110.0014
states
state_id_array0.00200.186010.0020
state_identifier_array0.00090.085220.0005
Override
Cache load0.00150.1328260.0001
Sytem overhead
Fetch class attribute can translate value0.00080.075320.0004
Fetch class attribute name0.00250.224050.0005
XML
Image XML parsing0.00230.210420.0012
class_abstraction
Instantiating content class attribute0.00000.001670.0000
General
dbfile0.00480.4372170.0003
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs