rpau / javalang-compiler

Java compiler elements (symbol and type tables) to perform code semantic analysis
GNU Lesser General Public License v3.0
10 stars 4 forks source link

Custom ClassLoader for indexing classes #85

Closed rpau closed 6 years ago

rpau commented 6 years ago

@cal101 feel free to review it :)

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.1%) to 86.043% when pulling 720e80c890d12320a9211572bc307c20224c1e33 on rpau-index into 47880332066c25445796187d609166a5246c9610 on master.

rpau commented 6 years ago

@cal101 what I have realized is that using ASM (bytecode parser) is probably much faster than using reflection, specially to read the class definition. Now, the critical point is addType in TypesLoaderVisitor.

https://github.com/EsotericSoftware/reflectasm

cal101 commented 6 years ago

Reflectasm sounds cool but is reflection really a (measured?) problem? Or do you think about avoiding class loading via class loser and replace that with reflectasm? I wonder what that means for access of depended classes.

Since I got some strange results when profiling the class loader related code when I profiled that I used some simple timer based counting System.currentTime*. I found the results more reliable.

Regarding the review I will try to find a slot.

rpau commented 6 years ago

@cal101 thanks for your comments. Now I will review and fix one by one :)

BTW: about the performance improvement replacing reflection by ASM: https://github.com/rpau/javalang-compiler/pull/86

rpau commented 6 years ago

@cal101 waiting for your approval ;)

cal101 commented 6 years ago

Will look at it after some sleep, garden work, shopping, working and driving. Maybe even some snack inbetween ;-)

rpau commented 6 years ago

@cal101 could you review the last changes and then approve if you consider? I think that all your styling comments have been addressed.