ikkisoft / SerialKiller

Look-Ahead Java Deserialization Library
Other
405 stars 68 forks source link

Cache for RegExp to improve performance #4

Closed ikkisoft closed 6 years ago

ikkisoft commented 8 years ago

With the current implementation, each regexp lookup involves filesystem access

$ inotifywait -mr ./
./ OPEN serialkiller.conf
./ ACCESS serialkiller.conf
./ CLOSE_NOWRITE,CLOSE serialkiller.conf

To improve performances, we could create a cache for all blacklists/whitelists - dropped whenever configuration reloads. Potentially, we could also make that cache static and/or thread-local and dependent on the filename, so that two SerialKillers with the same config share the cache

ikkisoft commented 8 years ago

Implemented in v0.3

ikkisoft commented 8 years ago

I've reverted https://github.com/ikkisoft/SerialKiller/commit/9ef69203de1cd2e5e1b4d86fee9912afe3a6a0d6 as it didn't seem to work properly on the latest version of Commons Configuration. I need to rethink the strategy here.