Haxl
Haxl copied to clipboard
Bounded cache
This is my proposal for #32. It enables users of Haxl to use caches of bounded size, but keeps "cache everything" as the default behaviour.
Please let me know if you have any remarks or want me to change anything.
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!
Taking a glance over this, it is slightly intrusive and touches some performance-critical bits (e.g. DataCache.lookup
). We'll need to be careful it doesn't impact performance.
Yes, unfortunately it's rather intrusive. I'm also not sure whether the use case this opens up, transferring large amounts of data, is something that other Haxl users will want to do.
@simonmar, @kantp Hi, any update on this?
Hi @jkomyno, no news from my side. I have moved away from the project that I had used this in (using a fork of the repository with this patch), so I didn't pursue this any further. If it's deemed useful, I'd be happy to help in getting it merged, though. But the performance concerns are a valid point of course, we'd need to make sure that performance is not impacted by this.
@jkomyno in principle I have no objection to including a bounded cache of some kind, but it needs to have zero (or close to zero) overhead.