Forums / Developer / Slow loading times when translation

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

eZ debug

Timing: Jan 18 2025 20:56:27
Script start
Timing: Jan 18 2025 20:56:27
Module start 'content'
Timing: Jan 18 2025 20:56:27
Module end 'content'
Timing: Jan 18 2025 20:56:27
Script end

Main resources:

Total runtime0.2097 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 587.7344180.8281
Module start 'content' 0.00760.0054 768.562598.0078
Module end 'content' 0.01300.1966 866.5703527.2969
Script end 0.2096  1,393.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00361.7315200.0002
Check MTime0.00140.6734200.0001
Mysql Total
Database connection0.00080.379610.0008
Mysqli_queries0.154173.47431410.0011
Looping result0.00140.67231390.0000
Template Total0.196293.610.1962
Template load0.00080.375910.0008
Template processing0.195493.188610.1954
Override
Cache load0.00050.257010.0005
Sytem overhead
Fetch class attribute can translate value0.00120.570910.0012
XML
Image XML parsing0.00030.146910.0003
General
dbfile0.00733.4716200.0004
String conversion0.00000.004730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs