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 168267 - Delete of java file is often very slow or blokec.
Summary: Delete of java file is often very slow or blokec.
Status: RESOLVED DUPLICATE of bug 134716
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2009-07-08 09:10 UTC by Pavel Flaska
Modified: 2009-09-18 22:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Profiler snapshot (523.00 KB, application/octet-stream)
2009-07-08 09:19 UTC, Pavel Flaska
Details
Simple patch (2.30 KB, patch)
2009-07-15 10:43 UTC, Pavel Flaska
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Flaska 2009-07-08 09:10:15 UTC
When trying to check why is delete of file blocked when scan in progress, we've found problems during delete action.

1. Delete action blocked throughout scanning
SafeDeleteAction intercepts common delete action and needs to run userActionTask in infrastructure, which is blocked by scan.

2. Delete action is slow when deleting bunch of files
Again, refactoring needs to run several user action tasks - exactly said NodeToFileObjectTask. (task per file)..

3. Other refactoring plugins are also initialized, e.g. HibernateRefactoring, SpringBeansPlugin.

All these initialization can be useful when SafeDeleteRefactoring, but when plain delete, the computation just wastes time. For example, when deleting 
bunch of files containing at least one non-java file, the refactoring isn't used and the deletion is straightforward.
Comment 1 Pavel Flaska 2009-07-08 09:15:03 UTC
Perhaps there is a way how to optimize the code, but we are more interesting in a way how to postpone refactoring initialization until user decides about safe 
delete. For better understanding, I will provide profiler snapshot of current behavior.
Comment 2 Pavel Flaska 2009-07-08 09:19:05 UTC
Created attachment 84479 [details]
Profiler snapshot
Comment 3 Pavel Flaska 2009-07-15 10:43:26 UTC
Created attachment 84761 [details]
Simple patch
Comment 4 Jan Pokorsky 2009-07-29 13:21:03 UTC

*** This issue has been marked as a duplicate of 134716 ***
Comment 5 Quality Engineering 2009-09-18 22:23:20 UTC
Integrated into 'main-golden', will be available in build *200909181401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/68bf059531b8
User: Pavel Flaska <pflaska@netbeans.org>
Log: #168267: Do not block delete when scan in progress.