Date: 08/16/01
- Next message: CVS Account Request: "[PHP-DEV] CVS Account Request"
- Previous message: drfickle <email protected>: "[PHP-DEV] Bug #12799: mysql_fetch_array returns good data even if resource identifier is bad"
- Next in thread: Chuck Hagenbuch: "[PHP-DEV] Re: [PATCH] ext/imap (imap_search)"
- Reply: Chuck Hagenbuch: "[PHP-DEV] Re: [PATCH] ext/imap (imap_search)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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-----
- TEXT/PLAIN attachment: php_fast_imap_search.diff
-- 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>
- Next message: CVS Account Request: "[PHP-DEV] CVS Account Request"
- Previous message: drfickle <email protected>: "[PHP-DEV] Bug #12799: mysql_fetch_array returns good data even if resource identifier is bad"
- Next in thread: Chuck Hagenbuch: "[PHP-DEV] Re: [PATCH] ext/imap (imap_search)"
- Reply: Chuck Hagenbuch: "[PHP-DEV] Re: [PATCH] ext/imap (imap_search)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

