0

When I work on Netbeans, sometimes there appear the "Refreshing Indices" on the bottom bar. The crazy thing is this process takes more than 2 or 3 hours to finish. Furthermore, I cannot clean the cache during this process is running.

Well, frankly, I don't care about the wasting of my RAM and CPU. But the point is I cannot clean cache. How to resolve it?

Speeder
  • 120
  • 3
  • 12
  • Any virus scanner active that might slow things done? The cache (https://stackoverflow.com/questions/8689780/how-to-clear-the-cache-in-netbeans) should only be deleted while NetBeans is closed. Or do you refer to another cache? – Joachim Rohde Jul 15 '21 at 07:39
  • in this question, I mean the "clean cache" - the choice before building the project. I am not sure why the "refreshing indices" takes so much time to finish. – Speeder Jul 15 '21 at 19:53
  • "_the choice before building the project_" - do you mean the "clean" step, when performing a "clean and build" for one project (Shift-F11)? - that does not clean the cache. That just deletes any previously compiled class files and assembled JARs, before re-compilation. The only "refreshing indices" thing I am aware of is when Maven re-indexes its local index - which, yes, can take a long time (but does not stop me from performing "clean and build" for a project). – andrewJames Jul 15 '21 at 20:06
  • If it's the Maven indexing process which is slow for you, you can experiment with its frequency: Main Menu > Tools > Options > Java > Maven > Index > Index Update Frequency. – andrewJames Jul 15 '21 at 20:07
  • Thanks. That will be a great help for me. – Speeder Jul 15 '21 at 20:19
  • 1
    OK - if it does turn out to be helpful, you are welcome to post an answer to your own question and give your findings, to help other people. But be warned, not indexing at all may cause other problems (for example, failure to auto-suggest the latest library versions, etc, in your Maven POMs). – andrewJames Jul 15 '21 at 20:32

1 Answers1

1

Refreshing indices may take a long time. We need to wait until this action is finished. Usually, there is no need to worry about that because this is the regular activity of Netbeans. Please don't pay much attention to this, just work. In my case, sometimes, it takes a long time. But I am not sure why it takes so long. According to Andrew's saying we can just adjust the frequency of index updating.

Main Menu > Tools > Options > Java > Maven > Index > Index Update Frequency

Hope this will help some others.

Speeder
  • 120
  • 3
  • 12