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.
We're trying to implement ToDo list in cnd without using indexing because of performance issues that comes with it (scanning too much file types etc.) Currently FileTaskScanner.scan is called from TaskIndexer (indexing) and unused class FileScanningWorker (closed API). We want ToDo list to be lazy so that indexing only start when user opens the view. At the same time we want to reuse current TodoTaskScanner with options ui. Now we have a prototype that works with FileScanningWorker. Is it possible to make it publicly available? Or is there any other public way to reuse TodoTaskScanner without using indexing?
Adding Tomas on Cc: ...
As far as I know we discussed the possibility to trigger task list lazily (using the indexer) when the TaskList is opened. This would be very helpful as the task list overhead (FileScanner + other non badging providers) can be removed from scanning time and run when the TL is opened (and probably cancelled when it's closed). This was discussed on some performance team and would be very helpful.
(In reply to comment #2) > As far as I know we discussed the possibility to trigger task list lazily > (using the indexer) when the TaskList is opened. This would be very helpful as > the task list overhead (FileScanner + other non badging providers) can be > removed from scanning time and run when the TL is opened (and probably > cancelled when it's closed). This was discussed on some performance team and > would be very helpful. I'm not sure if I understand it right what you meant by "trigger task list lazily", detach TaskList from Indexing when closed, or something else? Right now it TaskList is lazy in the meaning of it does not scan anything when the window is closed (see TaskIndexer.java:85) and then re-scan if needed (if the cache is dirty). Changing Issue Type to ENHANCEMENT
Maybe I should have specified it this way: Provide a way to run FileTaskScanners without indexing The only way to do it now is to use private FileScanningWorker.
>Right now it TaskList is lazy in the meaning of it does not scan anything when >the window is closed. Not true, the TaskList is only partially lazy (the fix of the issue #206026 fixed the Todo provider), however the other TL providers like expensive HTML validation are still uselessly running in the scan time even when the TL is closed.
I'm afraid I'm missing something. All FileTaskScanners are called to scan only from TaskIndexer and only when the window is opened. So I guess there is a problem with PushTaskScanners, right? But still they are detached when the window is closed. Can you send me a link to the source of the HTML validation provider you mentioned? Thanks
Guys, let's not mix several issues into this one. I have a prototype that use FileTaskScanners without indexing via FileScanningWorker from tasklist.impl. Could you either: 1. Move FileScanningWorker to public API or 2. Introduce a way to use FileTaskScanners without indexing
(In reply to comment #7) > Guys, let's not mix several issues into this one. I have a prototype that use > FileTaskScanners without indexing via FileScanningWorker from tasklist.impl. > Could you either: > 1. Move FileScanningWorker to public API > or > 2. Introduce a way to use FileTaskScanners without indexing Well honestly I don't think we should do it either way. There is already a way how to add task without indexing - you need to implement PushTaskScanner. PushTaskScanners are not "listening" on Indexing, but task list let them know if if there is a scope selected so you can scan relevant files when it is really needed.
That's exactly what I do - implement PushTaskScanner. The question is how to invoke TodoTaskScanner from there (it has all settings and the functionality we need).
(In reply to comment #9) > That's exactly what I do - implement PushTaskScanner. The question is how to > invoke TodoTaskScanner from there (it has all settings and the functionality we > need). I understand you would like to use current Todo scanner but I won't provide a way to invoke providers from the outside (in this case from another provider) it would be a hack just for this particular case and it should not be in API. I can't come up with any "clean" solution how to take advantage of Todo scanner but you can consider using it directly (implementation dependency) but as I said, it is not very nice...
Created attachment 131885 [details] FileScanningWorker patch Ok, I'll implement it with implementation dependency for now. Even so, attached patch is required to be applied to FileScanningWorker, any objections?
I've applied the patch and pushed the prototype on cnd side: http://hg.netbeans.org/cnd-main/rev/f44d66f6554a http://hg.netbeans.org/cnd-main/rev/ef5c1f547b07 we'll see how it works and possibly find a solution without implementation dependencies
(In reply to comment #11) > Created attachment 131885 [details] > FileScanningWorker patch > > Ok, I'll implement it with implementation dependency for now. > Even so, attached patch is required to be applied to FileScanningWorker, any > objections? I'm afraid that you misunderstood what I've meant. You don't need to use FileScanningWorker at all. 1. Add implementation dependency directly on TODO scanner 2. Use TODO scanner to scan files from active scope - you will get tasks 3. Use Callback.setTasks to push tasks to the TaskList Like that you won't mess up with the infrastructure and still you will get all settings etc.
I will try, thanks!
Here is an implementation without use of FileScanningWorker and implementation dependencies, I lookup TodoTaskScanner by class name: http://hg.netbeans.org/cnd-main/rev/28d6f1bdef43 I will test it and see how it works together with other FileTaskScanners...