buck icon indicating copy to clipboard operation
buck copied to clipboard

Consider using a faster serializer for java objetcs

Open kageiit opened this issue 10 years ago • 3 comments

Currently, the buck codebase uses Jackson's ObjectMapper in several places to read/write java objects to/from json for things like DependencyFiles etc.

There are many more much faster serializers available that be used as drop in replacements for jackson

https://github.com/eishay/jvm-serializers/wiki

Should consider switching buck to use a much faster serializer than jackson to make builds faster

kageiit avatar Nov 11 '16 08:11 kageiit

I'd like to see a profile that shows a non-trivial fraction of build time being spent in this code on some real build. If we can produce that, I'd be in favor of this.

dreiss avatar Nov 11 '16 16:11 dreiss

Also, advantage of JSON over some binary format is that it is more or less human readable. As @dreiss said, we should avoid doing any microoptimizations unless it's a real issue.

plamenko avatar Nov 16 '16 18:11 plamenko

Will revisit this some other time then. Thanks!

kageiit avatar Nov 16 '16 18:11 kageiit