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 252539 - Query progress bar not display properly
Summary: Query progress bar not display properly
Status: RESOLVED INCOMPLETE
Alias: None
Product: connecteddeveloper
Classification: Unclassified
Component: Issuetracking Framework (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-22 02:17 UTC by jijwang
Modified: 2015-06-01 12:54 UTC (History)
0 users

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 jijwang 2015-05-22 02:17:41 UTC
When running query, the progress bar on the lower right does not behave properly. It starts with 0% and stays there. Then suddenly it becomes 100% and then stays there for a long time. Then it finally shows the results
Comment 1 Tomas Stupka 2015-05-22 09:06:05 UTC
can't reproduce on a current dev build
please provide 
- info about the build you are using
- the exact steps how to reproduce - is a saved query or ad-hoc, refresh is invoked from ctx menu, the query dlg, etc ...

thanks
Comment 2 jijwang 2015-05-23 00:04:21 UTC
(In reply to Tomas Stupka from comment #1)

> - info about the build you are using
20150518-0fab368b504e
> - the exact steps how to reproduce - is a saved query or ad-hoc, refresh is
> invoked from ctx menu, the query dlg, etc ...
Open a new query. specify criteria, click search.
To see the problem more obviously, pick a query that will take long time to return the initial total count and in SynchronizeQueryCommand.execute.containerChagned(), the following to be true to get the syncTasksJob running.
if (!monitor.isCanceled() && !pendingToRefreshTasks.isEmpty()) {
...
syncTasksJob.run(monitor);
...}

I think the % calculation might be improved. Currently the % progress is not close to the real time elapsed. 

User can specify MAX_RETRIEVE_PER_QUERY which can be much lower than the total results. If there is API to know that figure, it would be easy to have better estimate.
Comment 3 Tomas Stupka 2015-06-01 12:54:25 UTC
> (In reply to Tomas Stupka from comment #1)
> > - info about the build you are using
> 20150518-0fab368b504e
> > - the exact steps how to reproduce - is a saved query or ad-hoc, refresh is
> > invoked from ctx menu, the query dlg, etc ...
> Open a new query. specify criteria, click search.
> To see the problem more obviously, pick a query that will take long time to return the initial total count and in SynchronizeQueryCommand.execute.containerChagned(), the following to be true to get the syncTasksJob running.
> if (!monitor.isCanceled() && !pendingToRefreshTasks.isEmpty()) {
> ...
> syncTasksJob.run(monitor);
> ...}
if you are able to reproduce, than is there any chance to describe it in a real life usecase? 
would make things much easier than trying to figure out from the code why !pendingToRefreshTasks.isEmpty() 

> I think the % calculation might be improved. Currently the % progress is not close to the real time elapsed. 
> User can specify MAX_RETRIEVE_PER_QUERY which can be much lower than the total results. If there is API to know that figure, it would be easy to have better estimate.
how???