Warning: mysql_connect(): Lost connection to MySQL server at 'reading authorization packet', system error: 0 in /www2/phpbuild/php/_Database.inc on line 19
Lost connection to MySQL server at 'reading authorization packet', system error: 0 PHPBuilder.com, the best resource for PHP tutorials, templates, PHP manuals, content management systems, scripts, classes and more.

Partners & Affiliates














  • No Items Found



[PHP-DEV] [PATCH] ext/imap (imap_search) From: Rob Siemborski (rjs3 <email protected>)
Date: 08/16/01

I've been doing some work with large mailboxes using the php imap module
and I uncovered a pretty severe efficiency bug that results in monstrous
amounts of silly computation.

Basically, what is happening is each call to mm_searched() is resulting in
a traversal of the entire linked list so far. I believe this results in
something like O(nlog(n)) performance on what should be an O(1) operation.

The addition of a tail pointer to the list fixes this problem. I also
made the free function non-recursive, which is somthing that could
probabally be applied to most of the list-freeing functions in php_imap.c

I'd like to see this in 4.0.7 if possible.

Please give comments / let me know when its committed.

Thanks,
-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski | W3VC President * Scotch & Soda Technical Coordinator
Andrew Systems Group * Cyert Hall 235 * 412-CMU-TREK | ABTech Exec
-----BEGIN GEEK CODE BLOCK----
Version: 3.12
GCS/IT/CM/CC/PA d- s+: a-- C++++$ UBLS++++$ P+++$ L++(+++) E W- N- o?
K- w O- M-- V-- PS+ PE++ Y+ PGP+ t+@ 5+++ R@ tv-- b+ DI+++ G e h r y?
------END GEEK CODE BLOCK-----

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>