Ticket #400 (closed defect: fixed)
Opened 5 years ago
error.php is slow
| Reported by: | dmorton | Owned by: | dmorton |
|---|---|---|---|
| Priority: | high | Milestone: | 1.0.3 |
| Component: | PHP scripts | Version: | 1.0.2 Devel |
| Severity: | major | Keywords: | |
| Cc: |
Description
I started doing some php profiling, and discovered up to half of the time
during a page load is spent inside userErrorHandler and especially recomputing a date() which may or may not be used.
Real User System secs/ cumm %Time (excl/cumm) (excl/cumm) (excl/cumm) Calls call s/call Memory Usage Name -- 48.0 0.10 0.10 0.09 0.09 0.01 0.01 171 0.0000 0.0000 0 date 6.0 0.02 0.02 0.01 0.01 0.00 0.00 12 0.0000 0.0000 0 sizeof 6.0 0.01 0.01 0.01 0.01 0.00 0.00 93 0.0000 0.0000 0 define 6.0 0.01 0.01 0.01 0.01 0.00 0.00 6 0.0000 0.0000 0 defined 4.0 0.00 0.00 0.01 0.01 0.00 0.00 8 0.0000 0.0000 0 mysql_real_escape_string 2.0 0.00 0.00 0.00 0.00 0.00 0.00 13 0.0000 0.0000 0 mysql_select_db 2.0 0.00 0.00 0.00 0.00 0.00 0.00 48 0.0000 0.0000 0 ThemeSmarty->assign 2.0 0.00 0.00 0.00 0.00 0.00 0.00 12 0.0000 0.0000 0 DB_result->DB_result 2.0 0.02 0.02 0.00 0.00 0.00 0.00 4 0.0000 0.0000 0 array_merge 2.0 0.00 0.00 0.00 0.00 0.00 0.00 50 0.0000 0.0000 0 is_array 2.0 0.00 0.00 0.00 0.00 0.00 0.00 8 0.0000 0.0000 0 preg_split 2.0 0.01 0.11 0.00 0.09 0.00 0.01 171 0.0000 0.0000 0 userErrorHandler
As near as I can tell, the only reason for this function is to make PHP notices and debug statements available to the pear logger object, so we can for instance do an html popup to catch the error. nice maybe for development and testing, but completely unneeded in production.
Unless there are any objections, I'm just going to remove error.php and all references to it. PHP errors are normally sent to a log file anyway.

