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 194969 - Http Javadoc blocks editor
Summary: Http Javadoc blocks editor
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Javadoc (show other bugs)
Version: 7.0
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords: PERFORMANCE, REGRESSION
: 195507 196641 200640 (view as bug list)
Depends on: 195649
Blocks: 41443
  Show dependency tree
 
Reported: 2011-02-01 19:12 UTC by Tomas Zezula
Modified: 2011-10-12 13:26 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Improved patch of asynchronous ElementJavadoc (43.02 KB, patch)
2011-02-03 13:49 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2011-02-01 19:12:12 UTC
The http javadoc block editor features. The http access is done under the parser lock, the lock block other threads doing code completion and scheduler tasks.
For more details see http://netbeans.org/bugzilla/show_bug.cgi?id=187919#c11.
Comment 1 Jesse Glick 2011-02-02 14:10:43 UTC
Sounds like using Future<String> will be quite difficult. Simpler proposal is to just disable remote Javadoc for the editor; it would still be displayed in the Javadoc window if open. People who really need the popup are, as usual, encouraged to download Javadoc for offline use.

Could also set up a persistent cache (using JavaIndex.getCacheFolder) for downloaded Javadoc, with an expiry policy based on Last-Modified, rather than the current transient cache; this would permit cached remote Javadoc to be displayed in the editor too (especially if the first attempt triggered an asynch download).
Comment 2 Tomas Zezula 2011-02-03 13:49:29 UTC
Created attachment 105622 [details]
Improved patch of asynchronous ElementJavadoc
Comment 3 Tomas Zezula 2011-02-03 13:53:31 UTC
Dusan found a way how to cancel the JavaCompletionProvider.query() method.
So I've added it into the diff. The diff also depends on the fixes of AE (#194743), changesets:
http://hg.netbeans.org/jet-main/rev/c4fa36c181db
http://hg.netbeans.org/jet-main/rev/5d6cf6d73fb8

The patch needs an API change (added asynchronous method ElementJavadoc.getFutureText returning Future<String> in addition to synchronous String getText)
Comment 4 Tomas Zezula 2011-02-03 14:09:43 UTC
Maybe we can join it with Jesse's cache.
In case of local or cached pages it will be handled as today.
The remote pages will be done asynchronously. They will still be shown in the editor for those who has fast enough connection. For people having slow connection the http request will not block the editor infrastructure and when the page is downloaded it will be put into the cache => it will be fast in next call.
Comment 5 Dusan Balek 2011-02-15 15:00:35 UTC
*** Bug 195507 has been marked as a duplicate of this bug. ***
Comment 6 Jan Becicka 2011-02-17 12:35:37 UTC
looks like P2 to me.
Comment 7 Tomas Zezula 2011-02-17 13:24:49 UTC
I will probably integrate the patch.
After clean up it works fine. It does not block code completion and javadoc for non http URLs.
For HTTP URL it blocks all successive HTTP request until the current is done (RequestProcessor with throughput 1). Probably we may add a Progress into IDE to show it to user.
Comment 8 Jesse Glick 2011-02-17 15:35:58 UTC
The patch exceeds my understanding of the editor so I am not going to commit it myself; if left assigned to me I would follow the ideas in comment #1.
Comment 9 Tomas Zezula 2011-02-18 07:18:13 UTC
OK, I am going to commit it. The ideas in comment #1 improve the current patch, so if you have a time for it the caching is welcomed. It will improve the latency of getting the http javadoc for successive calls.
Comment 10 Dusan Balek 2011-02-21 09:38:32 UTC
The attached patch looks OK.
Comment 11 Tomas Zezula 2011-02-21 17:28:46 UTC
Fixed jet-main 906582f76431
Comment 12 Quality Engineering 2011-02-25 05:33:12 UTC
Integrated into 'main-golden', will be available in build *201102250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/906582f76431
User: Tomas Zezula <tzezula@netbeans.org>
Log: #194969:Http Javadoc blocks editor
Comment 13 Dusan Balek 2011-03-18 12:01:38 UTC
*** Bug 196641 has been marked as a duplicate of this bug. ***
Comment 14 Dusan Balek 2011-10-12 13:26:52 UTC
*** Bug 200640 has been marked as a duplicate of this bug. ***