Yes i use the format from mysql without timezone information in it.
Following the result of my profiling with zend studio on a page of my
application :
Function Calls Count Average Own Time Own Time(s) Others Time(s) Total
time(s) loadClass 54 0,003734 0,201624 0,290387 0,492011 setTimezone
211 0,000859 0,181282 0,003112 0,184394 _query 129 0,000766 0,098753
0,001724 0,100477 get 400 0,000122 0,048777 0,050151 0,098928
getStationsFromResult 1 0,045352 0,045352 0,039419 0,084771
_loadTranslationData 1 0,043044 0,043044 0,073015 0,116059 isReadable
29
0,001202 0,034853 0,000000 0,034853 isLocale 806 0,000042 0,033534
0,028038 0,061572 _calculate 63 0,000488 0,030753 0,291324 0,322077
_parseDate 41 0,000696 0,028554 0,135469 0,164023
The same profiling after commenting line 199, 200, 1211, 1212 in Zend_Date
:
Function Calls Count Average Own Time Own Time(s) Others Time(s) Total
time(s) loadClass 54 0,003299 0,178169 0,251378 0,429547 _query 129
0,000583 0,075260 0,001285 0,076545 _loadTranslationData 1 0,035866
0,035866 0,050433 0,086299 getStationsFromResult 1 0,033911 0,033911
0,024751 0,058662 isReadable 29 0,001083 0,031419 0,000000 0,031419
get
400 0,000078 0,031011 0,033435 0,064446 __construct 2 0,011940 0,023879
0,000000 0,023879 _loadClass 12 0,001880 0,022560 0,045609 0,068169
_calculate 63 0,000343 0,021589 0,191601 0,213190 isLocale 806
0,000025
0,019920 0,017211 0,037131
On Wed, Mar 26, 2008 at 8:05 PM, Thomas Weidner <[EMAIL PROTECTED]>
wrote:
Where do you see a performance problem ???
I've run tests on my development laptop with a average execution time for
the related function of 0.3 milliseconds without using any cache.
Are you using historical timestamps ? This could lead to performance
issues.
Greetings
Thomas Weidner, I18N Team Leader
http://www.thomasweidner.com
----- Original Message -----
From: "Davide Mendolia" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 26, 2008 6:57 PM
Subject: [fw-i18n] setTimezone and getTimezoneFromString
> Hi,
>
> How it's possible to skip or minimize the impact of performance of the
> following lines, when you instantiate a date with a format without
> timezone
> in it ?
>
> Zend_Date::__construct()
>
> 198: // try to get timezone from date-string
> 199: $zone = $this->getTimezoneFromString($date);
> 200: $this->setTimezone($zone);
>
> And specialy the call to DateObject::setTimezone()
> 1016: if ([EMAIL PROTECTED]($zone)) {
> ----------------------------------------------------------
> Example of Zend_Date object:
> new Zend_Date($row['stage_time_start'], Zend_Date::TIMESTAMP)
> Value of $row['stage_time_start']: UNIX_TIMESTAMP(stage_time_start) as
> stage_time_start(in a sql query.)
>
> Thanks
> --
> Davide Mendolia
>