note 16626 added to function.dba-replace
| From: | swain at panix dot com | Date: | Wed, 07 Nov 2001 04:03:55 +0000 |
| Subject: | note 16626 added to function.dba-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-20539@lists.php.net to get a copy of this message | ||
Note that if you replace an existing entry with a larger one, it will actually create a new entry
and the old one is simply lost. This is a memory leak in other words.
You might want to try padding your values to a certain size before putting them in the db file; for
example, if you are storing web pages in the db, pad them out to the next 500 byte size with spaces,
and strip the spaces when you read it out. This will go a long way in saving disk space. I've
seen db files grow to several megabytes with only a couple hundred text files in them.
--
http://www.php.net/manual/en/function.dba-replace.php
http://master.php.net/manage/user-notes.php?action=edit+16626
http://master.php.net/manage/user-notes.php?action=delete+16626
http://master.php.net/manage/user-notes.php?action=reject+16626