phpgroupware-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-tracker] [patch #3549] Speed up translation


From: Caeies
Subject: [Phpgroupware-tracker] [patch #3549] Speed up translation
Date: Wed, 15 Dec 2004 11:39:13 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041128 Firefox/1.0 (Debian package 1.0-4)

This mail is an automated notification from the patch tracker
 of the project: phpGroupWare.

/**************************************************************************/
[patch #3549] Latest Modifications:

Changes by: 
                Caeies <address@hidden>
'Date: 
                mer 15.12.2004 at 15:11 (GMT)

------------------ Additional Follow-up Comments ----------------------------
OK,

I made some little stats with xdebug (it's very empirical, so take with care).

I count 119 calls to lang() in the begining of filemanager/index.php (between 
it seems that some strings are translated but never displayed ...)

In the actual code, It took nearly 0.2075 sec to load the translation, then 
each call take ~ 0.00105 sec ...
So doing the arithmetics leed to around 0.3314 sec in total for the lang call 
...
Now in the second case :
If the string is missing it takes ~ 0.0026 sec foreach call, 
so in this condition, the worst case (ie each string is required only one time) 
give 0.3094 sec (so in fact this is less since a call to an already existing 
string take 0.0012 sec, and they are some of them)

So if you have less than ~ 150 calls to lang() the second option is the best 
(still a problem with the load of the sql server ...), with more than 150 calls 
your are in bad mood.

But when I speak about 150 calls that's unique strings, so the case for this to 
happen is not so frequent (I guess ?)

Notice that this depends of the number of translation required !!!! so this is 
the number of call for filemanager only ... bigger application should have 
different limits ...

So to conclude, i'm not sure that this is a real solution (at least not the 
actual patch, mine will be done soon).
I hope that the shm solution will be able to speed up a lot's this ...

regards,

Caeies






/**************************************************************************/
[patch #3549] Full Item Snapshot:

URL: <http://savannah.gnu.org/patch/?func=detailitem&item_id=3549>
Project: phpGroupWare
Submitted by: Sigurd Nes
On: dim 05.12.2004 at 14:52

Category:  API -  phpGWapi
Priority:  5 - Normal
Resolution:  None
Privacy:  Public
Assigned to:  skwashd
Originator Email:  
Status:  Open


Summary:  Speed up translation

Original Submission:  I think this patch should speed up the translation (lang 
function)

Follow-up Comments
------------------


-------------------------------------------------------
Date: mer 15.12.2004 at 15:11       By: Caeies <Caeies>
OK,

I made some little stats with xdebug (it's very empirical, so take with care).

I count 119 calls to lang() in the begining of filemanager/index.php (between 
it seems that some strings are translated but never displayed ...)

In the actual code, It took nearly 0.2075 sec to load the translation, then 
each call take ~ 0.00105 sec ...
So doing the arithmetics leed to around 0.3314 sec in total for the lang call 
...
Now in the second case :
If the string is missing it takes ~ 0.0026 sec foreach call, 
so in this condition, the worst case (ie each string is required only one time) 
give 0.3094 sec (so in fact this is less since a call to an already existing 
string take 0.0012 sec, and they are some of them)

So if you have less than ~ 150 calls to lang() the second option is the best 
(still a problem with the load of the sql server ...), with more than 150 calls 
your are in bad mood.

But when I speak about 150 calls that's unique strings, so the case for this to 
happen is not so frequent (I guess ?)

Notice that this depends of the number of translation required !!!! so this is 
the number of call for filemanager only ... bigger application should have 
different limits ...

So to conclude, i'm not sure that this is a real solution (at least not the 
actual patch, mine will be done soon).
I hope that the shm solution will be able to speed up a lot's this ...

regards,

Caeies

-------------------------------------------------------
Date: mer 15.12.2004 at 13:27       By: Caeies <Caeies>
Sorry but your patch forgot to use db->addslashes or something like that to 
avoid problems ;)

Cheers,

Caeies

(Will submit something if I found how to do it)






File Attachments
-------------------

-------------------------------------------------------
Date: dim 05.12.2004 at 14:52  Name: patchfile1.diff  Size: 1,1KB   By: sigurdne
Speed up translation
http://savannah.gnu.org/patch/download.php?item_id=3549&amp;item_file_id=3917






For detailed info, follow this link:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=3549>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]