On Sat, 2019-01-12 at 06:13 +0000, Nathan Ridge wrote:
Hi Adrian,
One of the current problem we are concerned with is that the projects
complexity increases and the RAM needed for the indexer is scaling
with them.
I have noticed this as well.
I assume the cause is the incapability of the GC to free the memory as
fast as new objects are allocated (a manual GC clears the RAM used, but
a few seconds later it is filled again).
I haven't investigated the matter enough to comment on the cause. I
would hesitate to draw conclusions based on assumptions.
Considering the above, would you allow refactorings like the following?
Refactor:
for (int i =0; ; i++) {
char[] charrArray = new char[1000];
}
As:
char[] charrArray;
for (int i =0; ; i++) {
charrArray = new char[1000];
}
If yes, I'm willing to do the refactorings myself and benchmark the changes.
I would be surprised if a refactoring like the above made a difference. It
seems to me that the JVM should already treat the above two snippets
equivalently.
+1. Going back in time, the move from String to char[] actually didn't save us much either and one of the regrets I have. Java is really good and fast at small object allocation and garbage collection.
That said, if benchmarks show that a change like the above really does
make a difference, I don't see why we wouldn't accept it, assuming it
preserves functionality, and preserves readability to the extent the above
example does.
And +1 here too. We're always looking for improvements in performance. I do worry though that some of it is just a nature of the game. I notice cquery isn't super fast at indexing of large projects either. But yes, anything that shows improvement would
be great. Thanks!
Regards,
Nate
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.eclipse.org_mailman_listinfo_cdt-2Ddev&d=DwICAg&c=yzoHOc_ZK-sxl-kfGNSEvlJYanssXN3q-lhj0sp26wE&r=NrrbvTHWa2Nbp_kAN0Hl1o3lM1WAwSes64uBjxjNhMc&m=rbwiL6CX34kF-YBoOBSRPseEd9ML2nt4trJQURniCVM&s=hHYrmorSjYYEag3RI-obRB05vKG9cwwEC0XlDPDXF5c&e=
|