[dev] Crushing temp file generation in Turba Objects
Michael M Slusarz
slusarz at horde.org
Tue Oct 25 16:22:11 UTC 2011
Quoting Michael J Rubinsky <mrubinsk at horde.org>:
> 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.
What's the purpose of the files though? Is it supposed to contain
image data? Because all I get are hundreds of 0-length files.
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the dev
mailing list