Improved Bindings.getBinding(Class) caching for Datatype.class
Previously Datatype.class binding was never cached nor statically
constructed and made available as Bindings.DATATYPE which is only
sensible because Datatype class is a central building block of Databoard
and therefore its binding should also be readily available instead of
all clients having to request for it separately.
A weak hashmap cache was also added for signature strings in
BindingRequest because it was noticed that in conditions where code
makes a lot of requests for uncached binding, the cost of String
construction in BindingRequest.getSignature starts to dominate
cpu/memory costs. Two main problems in there were: constantly creating
new strings and using the very inefficient String.replaceAll instead of
String.replace(char, char).
gitlab #82
Change-Id: I50fbbc2bbe1e5d6b8b5864c3aed4c228022e66dc
(cherry picked from commit
a1696e5257fae039410c924155fdeffc1ce1b3e9)