RequestProcessor priority constraints for background indexing tasks
0 reputation · 29 Apr 2022, 20:26 UTC
The NetBeans RequestProcessor API is designed to handle asynchronous task execution to keep the Event Dispatch Thread (EDT) responsive. While the architecture offloads long-running operations to worker threads, the current implementation lacks a mechanism for granular priority-based queuing when these background tasks compete.
When multiple concurrent requests occur—such as large-scale project indexing alongside simultaneous file-checkouts—the shared thread pool can experience exhaustion. This often results in perceived latency where critical tasks, like code completion lookups, are delayed because the engine does not distinguish between high-priority UI updates and heavy background I/O operations.
Is there a configuration option to assign specific priority levels to RequestProcessor tasks to ensure UI-critical lookups preempt background indexing? Can the background thread pool size be restricted specifically for indexing operations without affecting other global asynchronous worker threads?