Announcement Announcement Module
No announcement yet.
Debug Roo Startup Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Little more info...
    If you look in while roo is starting up:
    C:\Documents and Settings\<UserId>\Local Settings\Temp
    you'll find thousands of files named like: UpdateFile1897468594628609307tmp
    They're being created as roo attempts to start up.
    They contain things like this:

    #Updated at Thu Sep 30 15:50:48 CDT 2010
    #Thu Sep 30 15:50:48 CDT 2010
    menu_item_interack_list_label=Inter Acks
    label_com_company_project_app_terminatereason_arra ngementtouser=Arrangement To user
    menu_item_mlog$site_list_label=Mlog$ Sites
    label_com_company_project_app_preupload_linestring =Line String
    label_com_company_project_app_trantyp_createid=Cre ate Id
    label_com_company_project_app_affinitytyp_lastupda tedate=lastupdate date
    label_com_company_project_app_sitetopvdrhist_lastu pdateid=lastupdate Id
    label_com_company_project_app_payer_agrmntexpndate =Agrmnt Expn date
    label_com_company_project_app_dlysbmsnrange_sbmsnr angede=Sbmsn Range De
    label_com_company_project_app_arrangement_merchant refcd=Merchant Ref Cd
    menu_item_sitetoproccd_new_label=Site To Proc

    And so on..


    • #17

      Another user posted that Roo generates a lot of temp files and sure enough when I checked I had over 6gb of Roo temp files in the temp directory, deleted them all, and now it dropped from 15mins to < 1min.

      So I am assuming that since the Temp folder had so many files, it was taking a while for Roo to get access to a new Temp file for it's internal stuff.


      • #18
        Originally posted by jopierce View Post
        Little more info...
        If you look in while roo is starting up:
        C:\Documents and Settings\<UserId>\Local Settings\Temp
        you'll find thousands of files named like: UpdateFile1897468594628609307tmp
        They're being created as roo attempts to start up.

        For some reason I didn't see your post until just now, I could have fixed this 9 days ago lol.

        Combine the thousands or millions of temp files with a virus scanner and pretty sure that explains why roo is dragging to a halt in my case.

        Thanks a lot for all your help!!!


        • #19
          Is there anything that Roo can be doing to prevent this? Do we need a JIRA issue?


          • #20
            Taking a quick peek at the source code i found
            	public UpdateFile(UndoManager undoManager, FilenameResolver filenameResolver, File actual) {
            		Assert.notNull(undoManager, "Undo manager required");
            		Assert.notNull(actual, "File required");
            		Assert.isTrue(actual.exists(), "File '" + actual + "' must exist");
            		Assert.isTrue(actual.isFile(), "Path '" + actual + "' must be a file (not a directory)");
            		Assert.notNull(filenameResolver, "Filename resolver required");
            		this.filenameResolver = filenameResolver;
            		try {
            			backup = File.createTempFile("UpdateFile", "tmp");			FileCopyUtils.copy(actual, backup);
            		} catch (IOException ioe) {
            			throw new IllegalStateException("Unable to make a backup of file '" + this.actual + "'", ioe);
            		this.actual = actual;
            So it looks to me that the temp files are generated so that Roo can undo things safely if something bad happens.

            Since Roo doesn't support the user undoing things, it would seem to me that the Undo functionality should remove the temp files after a command has successfully executed.

            I will submit a bug so at least someone can look into it.


            • #21


              • #22
                I made a couple changes to the roo.bat that might help:
                @echo off
                setlocal enabledelayedexpansion
                rem Remap temp directory
                if exist temp\nul goto START_ROO
                md temp
                rem save the original temp directories
                SET ROO_BACKUP_TEMP=%TEMP%
                SET ROO_BACKUP_TMP=%TMP%
                rem set the new temp directories
                SET TEMP=temp
                SET TMP=temp
                for %%? in ("%~dp0..") do set ROO_HOME=%%~f?
                rem echo Resolved ROO_HOME: "%ROO_HOME%"
                rem Build a classpath containing our two magical startup JARs
                for %%a in ("%ROO_HOME%\bin\*.jar") do set ROO_CP=!ROO_CP!%%a;
                rem Hop, hop, hop...
                java -Dflash.message.disabled=false -Djline.nobell=true %ROO_OPTS% -Droo.args="%*" -DdevelopmentMode=false"%ROO_HOME%\cache""%ROO_HOME%\bundle""file:%ROO_HOME%\conf\" -cp "%ROO_CP%" org.springframework.roo.bootstrap.Main
                rem echo Roo exited with code %errorlevel%
                rem list the temp files created during the session
                dir temp
                rem remove the temp files
                rd /s /q temp
                rem set the original temp directories back
                SET TEMP=%ROO_BACKUP_TEMP%
                SET TMP=%ROO_BACKUP_TMP%
                SET ROO_BACKUP_TEMP=
                SET ROO_BACKUP_TMP=
                It basically creates a temp directory under the roo project directory and sets the environment variables TEMP and TMP to it. Then when you exit roo it lists all the temp files that were created, and then deletes them.
                It also saves the original TEMP directory paths and sets them back at the end.

                NOTE: Use with caution as I don't know the exact ramifications of removing the temp files. Also, this should work for multiple roo instances going as it uses a temp folder local to the roo instance running but if you open two instances in the same folder you could be deleting the other instances temp files, which I would assume would be pretty bad. I also don't know how this would effect the Roo that is called through STS, as I usually use the command line in a seperate window and not through STS.
                Last edited by btlife; Oct 13th, 2010, 08:55 PM.