[dev] Crushing temp file generation in Turba Objects

Michael J Rubinsky mrubinsk at horde.org
Tue Oct 25 13:15:13 UTC 2011


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Michael M Slusarz <slusarz at horde.org>:
>
>> What does this code do in Turba_Object#getValue() (line 110-17)?
>>
>>           return empty($this->attributes[$attribute])
>>                ? null
>>                : array(
>>                      'load' => array(
>>                          'data' => $this->attributes[$attribute],
>>                          'file' =>  
>> basename(Horde::getTempFile('horde_form_', false))
>>                      )
>>                  );
>>
>> Initializing a compose window causes 100's of empty temp files to  
>> be created in the system temp directory - this occurs when the  
>> contact autocompletion code is initialized.  These files are  
>> created once a session.  After a weeks worth of logins, I have  
>> 5,000+ of these temp files, that are never cleaned up.  This is not  
>> good.
>
> This problem was explicitly mentioned in the commit message:  
> http://git.horde.org/horde-git/-/commit/3a6dae7dab4c44fce7e283bd0c0ed4489808851a

Not sure what the solution is for this yet either. Essentially, we  
need a mechanism to allow for deleting temporary files at the end of  
the *session*, not at shutdown. Either that, or a complete refactor of  
the Horde_Form_Image type.

-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org



More information about the dev mailing list