PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Date and Time » Date » Bug #1421

Loading file takes time

Details

Submitted2004-05-17 06:34 UTC
Fromcontact at mann dot fr
Assignedpajoye
StatusSuspended
PackageDate
PHP Version4.3.4
OSLinux (Debian i586)
Roadmaps(Not assigned)

Comments

[2004-05-17 06:34 UTC] contact at mann dot fr

Description:
------------
Hi,

I ran some profiling a while ago on DB_DataObject.
require_once("Date.php");
took 0,3 secondes (I think it was around 0,3 sécondes with X debug on my pentium III 650 Mhz with tons of stuff running).
Relatively, the other scripts took much less time.
This may lead to some inefficienties.
I haven't yet examined the code, but I think that sectionning the parts that we may not need in "include_once" calls inside of flow controle functions might help speed things along.
Or perhaps, there is some procedural call that takes time.

Thanks,

Christopher

[2004-05-20 09:22 UTC] pierre at dotgeek dot org

Most of the problems is a design problem at this time. If you use only Date, we load Calc and TZ as well. Regardless of their usage. Some methods are dependent on TZ and Calc.

I'm not sure it's possible to change that now, without having BC.

Once I'm done with the base of date_time (pecl php5), I will give a try to a Date2, with smaller base classes and using date_time by default if we run on php5 (and dt is available ;) ).

--Pierre