christiangalsterer / stash-filehooks-plugin

An Atlassian Stash plugin to check on various file attributes, like size, name
Apache License 2.0
14 stars 27 forks source link

Performance and reliability fixes #38

Closed raspy closed 6 years ago

raspy commented 6 years ago

As a follow-up for #1, I would like to submit my changes. These were mostly around performance, but also two bugfixes:

Since my use case was to prevent large files uploaded (that should go into LFS), the first limitation was a major drawback that allowed large files to slip through.

As for performance, I have tested scenarios with file size hook with two different patterns set:

Every commit that introduced a performance change is accompanied with a longer description why the change was made and what was the result.

Please feel free to review and accept unless there are concerns. Should you have any questions, please don't hesitate to ask.

christiangalsterer commented 6 years ago

Thank you for your contribution and submitting a PR. Looking at the numbers this would be really a cool improvements. I'm travelling for the next couple of days hence it will take me a few more days to look into it.

christiangalsterer commented 6 years ago

Locally merged