| Summary: | Take account the Eclipse Progress Monitor | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Stephane Moline <stephane.moline> |
| Component: | BIRT | Assignee: | Haojun Chu <hchu> |
| Status: | VERIFIED FIXED | QA Contact: | Maggie Shen <lshen> |
| Severity: | critical | ||
| Priority: | P4 | CC: | bluesoldier, bvitale3002, stephane.moline, wenfeng.fwd, whe, wyan, xxue |
| Version: | 2.3.0 | Keywords: | plan |
| Target Milestone: | 2.5.0 M7 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | Obsolete | ||
|
Description
Stephane Moline
For RunTask, we have a IPageHandler callback. It is invoked for each page. We can add such a interface to the IRunAndRenderTask, do you think it is acceptable?
To obtain some new page-based functionality, like Progress Monitor, implement IPageHandler and set its instance to IRunAndRenderTask. This task will be invoked when a page is generated.
Following is an example of using IProgressMonitor.
// defining IPageHandler
class PageHandler implements IPageHandler {
IProgressMonitor progressMonitor;
public void onPage(int pageNumber, boolean checkpoint, IReportDocumentInfo doc)
{
// Do something with progressMonitor;
}
}
// defining task
runAndRenderTask.setPageHandler( new PageHandler() );
The IPageHandler method does not respond to our need. The html report only contains one page and the task take a lot of time. Also we really need that you use the eclipse Progress Monitor. Thanks. Need to make sure BIRT engine component doesn't depends on Eclipse UI code, since it has to be able to run on app servers such Webshpere. Maybe engine can add a progress monitor extension point, where engine will call to report progress at various execution steps. BIRT report designer can then implement an BIRT engine progress monitor extension point that calls Eclipse's IProgressMonitor. While on Web server, one can implement such an extension to log report execution performance/progress. It is hard to implement a accurate progress monitor as BIRT doesn't known the total time before finish the task.
Take the run task as example. The run task is divided into several phrases:
1. parser the design
2. for each element in the report design,
2.1 acquire the data set used by the element
2.2 for each row in the result set
a.generate the content using the result set
b.layout the content into pages
c.save the paged content into document.
from the step 2, BIRT can't calculate the accurate progress of a task as the total row in the result set is unknown while the most time is used in step 2. So i think the page (final output) is a well define unit for multiple paged report generation.
BIRT's page handle is only a simple interface and doesn't depend on the Eclipse's progress monitor. The user should adapter the Eclipse's progress monitor to BIRT's page handler to receive the task progress.
(In reply to comment #5) > Take the run task as example. The run task is divided into several phrases: > > 1. parser the design > 2. for each element in the report design, So if there are 10 design elements, use that as the total amount of work, and increment it as each design element is processed. I would think that level of granularity would be more useful than the current page-level implementation. (In reply to comment #6) > (In reply to comment #5) > > Take the run task as example. The run task is divided into several phrases: > > > > 1. parser the design > > 2. for each element in the report design, > So if there are 10 design elements, use that as the total amount of work, and > increment it as each design element is processed. I would think that level of > granularity would be more useful than the current page-level implementation. If a report design element is in the detail section of a table or list, they will be repeated N times, N = the number of rows in the result set of the table or list. So the progress of a report execution can not be measured by the number of elements that has been processed. (In reply to comment #5) > It is hard to implement a accurate progress monitor as BIRT doesn't known the > total time before finish the task. > Take the run task as example. The run task is divided into several phrases: > 1. parser the design > 2. for each element in the report design, > 2.1 acquire the data set used by the element > 2.2 for each row in the result set > a.generate the content using the result set > b.layout the content into pages > c.save the paged content into document. > from the step 2, BIRT can't calculate the accurate progress of a task as the > total row in the result set is unknown while the most time is used in step 2. > So i think the page (final output) is a well define unit for multiple paged > report generation. > BIRT's page handle is only a simple interface and doesn't depend on the > Eclipse's progress monitor. The user should adapter the Eclipse's progress > monitor to BIRT's page handler to receive the task progress. In addition to page generation, BIRT engine can also report progress during report design parsing, data set query execution and data binding calculations, since some of these steps could take significant time too. Also, it would be easier for an application to incroporate a progress monitoring feature if BIRT engine use a single extension point (such as org.eclipse.birt.IprogressMonitor) for all execution steps, so that developer does not need to implement different extension points (iPageHandler for page progress, iDataSetHandler for query execution, iDomParsing handler for parsing progress etc...) for different steps. need more time to resolve those issues. defer to RC0 as we don't have the final solution yet. Please check if the following solution satisfies. Provide this API: onProgress(ProgressType, Object value). The parameter ProgressType specifies the measure unit, for example, Page, ExecutingQuery, FetchingData, ParsingReport, GeneratingReport. The value parameter is a value proper to the ProgressType. For example, 1) which page: onProgress(Page, 1) 2) which query: onProgress(FetchingData, "result set name") 3) which element: onProgress(GeneratingReport, "element name") Thanks (In reply to comment #11) > Please check if the following solution satisfies. > Provide this API: onProgress(ProgressType, Object value). > The parameter ProgressType specifies the measure unit, for example, Page, > ExecutingQuery, FetchingData, ParsingReport, GeneratingReport. The value > parameter is a value proper to the ProgressType. > For example, > 1) which page: onProgress(Page, 1) > 2) which query: onProgress(FetchingData, "result set name") > 3) which element: onProgress(GeneratingReport, "element name") > Thanks Suggest to have the ProgressType all refers to an action. for example, page-->generatingPageContent or renderingPageToHtml or renderingPageToPDF, GeneratingReport-->generatingElementContent Provide IProgressMonitor to trace BIRT's progress. verified on April 30. You can set monitor on RunAndRender task now.Seven events are monitored: START_TASK,END_TASK,START_PAGE,END_PAGE,START_QUERY,END_QUERY,FETCH_ROW. |