Bug 168267 - Delete of java file is often very slow or blokec.
Delete of java file is often very slow or blokec.
Status: RESOLVED DUPLICATE of bug 134716
Product: java
Classification: Unclassified
Component: Refactoring
6.x
All All
: P2 (vote)
: TBD
Assigned To: issues@java
issues@java
: PERFORMANCE
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo