This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 144293 - A file is written down on every startup
Summary: A file is written down on every startup
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2008-08-18 18:07 UTC by Jaroslav Tulach
Modified: 2016-05-25 06:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2008-08-18 18:07:13 UTC
build.properties file is being written down multiple times whenever the IDE starts. This is causing premature 
initialization of local history, CVS, subversion, and slowing down start, especially on system with userdir on network 
drives. Please find a way to now write down anything, at least not on second start, when the file is already created.

checkWrite: /home/jarda/src/netbeans/fixes/ide.kit/build/test/qa-functional/work/userdir0/build.properties
        at org.netbeans.test.ide.CountingSecurityManager.checkWrite(CountingSecurityManager.java:145)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
        at org.netbeans.spi.project.support.ant.PropertyUtils$2.run(PropertyUtils.java:162)
        at org.netbeans.spi.project.support.ant.PropertyUtils$2.run(PropertyUtils.java:155)
        at org.openide.util.Mutex.writeAccess(Mutex.java:433)
        at org.openide.util.Mutex$1R.run(Mutex.java:1305)
        at org.openide.util.Mutex.doWrapperAccess(Mutex.java:1318)
        at org.openide.util.Mutex.writeAccess(Mutex.java:426)
        at org.netbeans.spi.project.support.ant.PropertyUtils.putGlobalProperties(PropertyUtils.java:154)
        at 
org.netbeans.modules.java.j2seplatform.libraries.J2SELibraryTypeProvider$1.run(J2SELibraryTypeProvider.java:108)
        at org.openide.util.Mutex$1Exec.run(Mutex.java:1239)
        at org.netbeans.api.project.ProjectManager$2$1.run(ProjectManager.java:120)
        at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:120)
        at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:499)
        at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:215)
        at org.netbeans.api.project.ProjectManager$2.execute(ProjectManager.java:118)
        at org.openide.util.Mutex.postRequest(Mutex.java:1245)
        at org.openide.util.Mutex.postRequest(Mutex.java:1209)
        at org.openide.util.Mutex.postWriteRequest(Mutex.java:582)
        at 
org.netbeans.modules.java.j2seplatform.libraries.J2SELibraryTypeProvider.libraryCreated(J2SELibraryTypeProvider.java:101)
        at org.netbeans.modules.project.libraries.LibrariesStorage.loadFromStorage(LibrariesStorage.java:165)
        at org.netbeans.modules.project.libraries.LibrariesStorage.initStorage(LibrariesStorage.java:203)
        at org.netbeans.modules.project.libraries.LibrariesStorage.getLibraries(LibrariesStorage.java:312)
        at org.netbeans.modules.project.libraries.LibrariesModule.initProviders(LibrariesModule.java:63)
        at org.netbeans.modules.project.libraries.LibrariesModule.restored(LibrariesModule.java:58)
        at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:419)
        at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:340)
        at org.netbeans.ModuleManager.enable(ModuleManager.java:904)
        at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:428)
        at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:364)
        at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:276)
        at org.netbeans.core.startup.Main.getModuleSystem(Main.java:163)
        at org.netbeans.core.startup.Main.start(Main.java:314)
        at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
        at java.lang.Thread.run(Thread.java:595)
Comment 1 Jaroslav Tulach 2008-08-19 10:23:50 UTC
Btw. there is another created file:

checkWrite: /home/jarda/src/netbeans/fixes/ide.kit/build/test/qa-functional/work/userdir0/config/org-netbeans-api-project-libraries/libraries-timestamps.properties
        at org.netbeans.test.ide.CountingSecurityManager.checkWrite(CountingSecurityManager.java:150)
        at java.io.File.createNewFile(File.java:849)
        at org.openide.filesystems.LocalFileSystem.createData(LocalFileSystem.java:267)
        at org.openide.filesystems.LocalFileSystem$Impl.createData(LocalFileSystem.java:551)
        at org.openide.filesystems.AbstractFileObject.createData(AbstractFileObject.java:466)
        at org.openide.filesystems.FileUtil.createData(FileUtil.java:582)
        at org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1073)
        at org.openide.filesystems.FileUtil.createData(FileUtil.java:582)
        at org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1073)
        at org.openide.filesystems.FileObject.createData(FileObject.java:721)
        at org.netbeans.modules.project.libraries.LibrariesStorage.saveTimeStamps(LibrariesStorage.java:491)
        at org.netbeans.modules.project.libraries.LibrariesStorage.loadFromStorage(LibrariesStorage.java:185)
        at org.netbeans.modules.project.libraries.LibrariesStorage.initStorage(LibrariesStorage.java:203)
        at org.netbeans.modules.project.libraries.LibrariesStorage.getLibraries(LibrariesStorage.java:312)
        at org.netbeans.modules.project.libraries.LibrariesModule.initProviders(LibrariesModule.java:63)
        at org.netbeans.modules.project.libraries.LibrariesModule.restored(LibrariesModule.java:58)
Comment 2 Jan Jancura 2009-04-09 14:05:23 UTC
all future should be change to LATER
Comment 3 Jaroslav Tulach 2009-04-09 16:44:43 UTC
"All future..." - well, then this bug probably cannot have "future" target milestone. It is really a bug to write down 
a file on every start. Moreover the fix cannot be that hard, in its minimal variant you can compare the content of the 
file before writing it down. Now, when you have FileObject.asString(...) it should be quite simple. Please reconsider 
prioritization.
Comment 4 Jan Jancura 2009-04-09 22:51:00 UTC
Prioritization reconsidered.
Feel free to evaluate user impact in some measurable way (ms), please.