Join GitHub today
add limited metadata caching to journald and other journal improvements #6392
Neat, something in this vein is long overdue.
I just did a pretty casual review, mostly nits, otherwise
It's good you addressed all the tiny allocation/frees for the various metadata fields. When I started reviewing I was concerned you wouldn't address that aspect while adding the cache. Your alloca approach is less invasive than mine was, though I avoided all copies. I think I like yours more.
referenced this pull request
Jul 19, 2017
Thanks for the review! I have now force pushed a new version with almost all of your points fixed. I did leave some functions returning "int", even though the caller ignores it then. It just feels weird to eat obvious OOM issues right away in the callee, it felt more natural to leave this to the caller. I mean, ultimately it doesn't really matter anyway, the compiler should optimize all this away easily as this stuff is all static, non-exported stuff...
Anway, I hope that makes some sense. Please have another look so that we can get this landed!