paper-nms-maven-plugin icon indicating copy to clipboard operation
paper-nms-maven-plugin copied to clipboard

Optimization of remapping code

Open LoneDev6 opened this issue 1 year ago • 4 comments

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 avatar Dec 12 '23 11:12 LoneDev6

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

LoneDev6 avatar Dec 25 '23 17:12 LoneDev6

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.

Alvinn8 avatar Dec 25 '23 17:12 Alvinn8

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!

LoneDev6 avatar Dec 27 '23 11:12 LoneDev6

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.

Alvinn8 avatar Jan 06 '24 13:01 Alvinn8