secondlife / viewer

🖥️ Second Life's official client
GNU Lesser General Public License v2.1
206 stars 52 forks source link

Replace jsoncpp with boost.json #1056

Closed bennettgoble closed 1 week ago

bennettgoble commented 5 months ago

Replace jsoncpp with our more up to date boost library's JSON module. Rationale:

### Tasks
- [ ] https://github.com/secondlife/viewer/issues/1057
brad-linden commented 5 months ago

increased dependence on boost has a lot of downsides. This would be a big topic of discussion I expect

brad-linden commented 5 months ago

@nat-goodspeed helped me articulate my discomfort a bit better. boost style libraries are well known for their high levels of indirection and template complexity. they all depend on core boost libraries and use them heavily. these costs are most obvious in compilation & linker time and inliner pressure which can lead to extra layers of runtime indirection as well.

now, serialization may be a case where both of those costs are reasonably contained, since the compliation costs will likely be limited to 2 or 3 translation units, and the runtime costs will probably be fine when hidden behind IO. but I don't know. this is the type of discussion I would hope for when introducing a dependency like this.

bennettgoble commented 5 months ago

I chatted with brad and we came to the conclusion that this change is desired. Not all boost modules are created equally, and in this case boost.json performance is decent and the module is well isolated.

AtlasLinden commented 1 month ago

Passing QA as no issues were spotted through the latest viewer regression test.