On Tue, Apr 28, 2015 at 08:49:00AM -0400, D. Michael McIntyre wrote:
> On 04/28/2015 07:24 AM, Ted Felix wrote:
> 
> >     Deleting them on close would delay closing of rg, potentially
> > confusing the user.  As it is now, it only delays opening of a document.
> 
> I have a vague memory that we clean up on load to avoid exactly this 
> problem.  There used to be a "pregnant pause" on close, and somebody 
> just punted and dealt with it a different way to avoid the problem.
> 
> We generally do a horrible job of cleaning up /tmp and there is lots of 
> room for improvement.  I'm all for it.

I think it's ok but perhaps it is better to create a specific folder
for Rosegarden in QDir::tempPath():

    ls /tmp/rosegarden/
    rosegarden_datablock_1003107301
    rosegarden_datablock_1038767975
    rosegarden_datablock_1153480216
    rosegarden_datablock_1199087203
    ...

otherwise it could be difficult to monitor other temp files in the same dir.

However, QDir::tempPath() works with TMPDIR, therefore we can do:

    ROSEGARDEN_TMPDIR="${ROSEGARDEN}/tmp"
    mkdir -p "${ROSEGARDEN_TMPDIR}"
    TMPDIR="${ROSEGARDEN_TMPDIR}" rosegarden

or

    # tmpfs
    TMPDIR="/dev/shm" rosegarden

Alternatively, a specific optional environment variable ROSEGARDEN_TMPDIR
should be useful, i.e.

        if ((tmpPath = getenv("ROSEGARDEN_TMPDIR")) == NULL)
            tmpPath = QDir::tempPath() + '/' + "rosegarden";

The policy for quit could be

        clear tmpfiles on quit if tmpfiles < 2000

and the rest remains the same (clear on open).

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to