[pLog-svn] r4777 - plog/branches/lifetype-1.2/class/config
Oscar Renalias
oscar at renalias.net
Mon Feb 19 15:40:31 EST 2007
Somebody posted a list of possible improvements and optimizations in
the plog-general list a long time ago and I recorded it in a case in
(http://bugs.lifetype.net/view.php?id=1033) so I was mostly working
based on those recommendations because I didn't have to look for
them, they had all already been laid out in front of me :-)
Then I installed xdebug2 (which rocks, by the way!) and I started to
optimize even more based on the traces it generates... I will
probably post a few more optimizations today.1
On 19 Feb 2007, at 22:34, Jon Daley wrote:
> I haven't jumped to 1.2 yet (sorry...) but looks like you have
> done a bunch of good work this weekend! I saw the changes based on
> that
> powerpoint doc - did you exhaustively search for those optimization
> cases,
> or is it worth looking through some more?
> I have been pretty swamped lately - working more aggressively on
> getting my company to be my only income.
> I'll be in Florida next week with my parents, so I won't be around
> as much on the forums.
> For this bug change - you probably want to remove the
> debuggin print statement.
>
>
> On Sun, 18 Feb 2007, oscar at devel.lifetype.net wrote:
>
>> Author: oscar
>> Date: 2007-02-18 16:51:01 -0500 (Sun, 18 Feb 2007)
>> New Revision: 4777
>>
>> Modified:
>> plog/branches/lifetype-1.2/class/config/configdbstorage.class.php
>> Log:
>> minor optimization, the previous approach didn't make too much
>> sense to me.
>>
>>
>> Modified: plog/branches/lifetype-1.2/class/config/
>> configdbstorage.class.php
>> ===================================================================
>> --- plog/branches/lifetype-1.2/class/config/
>> configdbstorage.class.php 2007-02-18 21:25:23 UTC (rev 4776)
>> +++ plog/branches/lifetype-1.2/class/config/
>> configdbstorage.class.php 2007-02-18 21:51:01 UTC (rev 4777)
>> @@ -127,18 +127,11 @@
>> */
>> function getValue( $key, $defaultValue = null )
>> {
>> - if (!is_object( $this->_cache )) {
>> - $this->_cache =& CacheManager::getCache();
>> - }
>> - if($this->_data == array()) {
>> - $data = $this->_data = $this->_cache->getData
>> ( CACHE_CONFIGDBSTORAGE, CACHE_GLOBAL );
>> - if ($data) {
>> - $this->_data = $data;
>> - } else {
>> - $this->_loadAllValuesFromDatabase();
>> - }
>> - }
>> -
>> + if( (!$this->_data = $this->_cache->getData
>> ( CACHE_CONFIGDBSTORAGE, CACHE_GLOBAL ))) {
>> + print("data not in cache!");
>> + $this->_loadAllValuesFromDatabase();
>> + }
>> +
>> if( array_key_exists($key, $this->_data) ) {
>> if ($this->_data[$key] == "" || $this->_data[$key]
>> == null) {
>> return $defaultValue;
>>
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://limedaley.com/mailman/listinfo/plog-svn
>>
>
> --
> Jon Daley
> http://jon.limedaley.com/
>
> Idleness: Doing nothing with a deal of skill
> -- William Cowper
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>
More information about the pLog-svn
mailing list