You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To fully replace encoding/json, it would be great to be able to pass an arbitraryinterface{} to refmt and have it auto-generate the necessary atlas entries.
What are the performance implications of this? I assume the tricky part here is caching these auto-generated atlases.
The text was updated successfully, but these errors were encountered:
It's totally doable, just needs some implementation time.
The stdlib encoding/json package is a great reference for how to do the caching part. I've forgotten exactly how it works, but it's reasonably efficient and has all the hard concurrency parts straightened out already: it should be fairly easy to port.
I'd still like to make it an option at the Atlas scale for whether or not auto-generation for unknown types is allowed. In that case, we don't have to worry about the performance implications at all, because you could opt out of having it come up at all.
The main place for autogeneration to be invoked would be right about here:
// TODO here we could also invoke automatic atlas autogen, if configured to be permitted
I'm not sure if it would be better to then have those generated AtlasEntrys be placed directly into the current Atlas (that would cause the sync code to spread More Places...) or to keep a separate map for generated AtlasEntrys. Leaning towards the latter because it seems simpler to implement, and that map of generated entries actually should be global.
To fully replace
encoding/json
, it would be great to be able to pass an arbitraryinterface{}
torefmt
and have it auto-generate the necessary atlas entries.What are the performance implications of this? I assume the tricky part here is caching these auto-generated atlases.
The text was updated successfully, but these errors were encountered: