Alvinn8 / paper-nms-maven-plugin

A maven plugin for using NMS on paper with Mojang mappings.
MIT License
115 stars 8 forks source link

Optimization of remapping code #24

Open LoneDev6 opened 11 months ago

LoneDev6 commented 11 months ago

Do you think it's possible to squeeze a little bit more of performance in this extension? Remap takes some time, I understand, but I'm wondering if we could optimize it a bit more to lower down the build time.

Thanks for your awesome work!

LoneDev6 commented 10 months ago

Maybe using some library that has native code would do the trick, just an idea.

Alvinn8 commented 10 months ago

Hi, sorry for not replying sooner. I'm not really aware of any native-code Java remappers. The only optimization I can really think of would be to cache remapped class files so that remapping only occurs when a change has been made. Would that speed up builds for your use case? I am a little low on free time at the moment, so I'll see how I prioritize my time though.

LoneDev6 commented 10 months ago

I think this is an interesting idea, skipping already remapped classes might actually decrease the build time. Another idea would be to benchmark the extension to check if there is some parts that can be reimplemented in a more performance-wise way.

Thank you for your time!

Alvinn8 commented 10 months ago

Most of the time consumed will probably be remapping of jars, which is done by third-party libraries. If you are concerned about performance, you could consider switching to gradle and paper's official tooling since grade is usually faster.