Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Anders Eknert
@anderseknert@swecyb.com  ·  activity timestamp 4 days ago

Finally took some time to try out the upcoming json/v2 package in #golang. And it delivers! Absolutely enjoying it so far, so thanks everyone involved in that work.

What I also found last night is that this new package makes extensive use of internal names like "arshal" and "arshaler". Surely I can't be the only one having to stop and reread those names every time they appear? Is this some elaborate joke or did someone really write a function named "lookupArshaler" with a straight face? Profiling some of the marshaling code I wrote last night and seeing pprof report the amount of "cum" in "typedArshalers" is absolutely sending me.

Screenshot of the pprof tool reporting memory allocations. The "cum" column was mildly amusing already, but paired with the line reporting allocations in "typedArshalers" is just too much.
Screenshot of the pprof tool reporting memory allocations. The "cum" column was mildly amusing already, but paired with the line reporting allocations in "typedArshalers" is just too much.
Screenshot of the pprof tool reporting memory allocations. The "cum" column was mildly amusing already, but paired with the line reporting allocations in "typedArshalers" is just too much.
Screenshot from my editor showing the "arshaler" struct of Go's new json/v2 package. and a function named "lookupArshaler".
Screenshot from my editor showing the "arshaler" struct of Go's new json/v2 package. and a function named "lookupArshaler".
Screenshot from my editor showing the "arshaler" struct of Go's new json/v2 package. and a function named "lookupArshaler".
  • Copy link
  • Flag this post
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.2.21 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login