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
When running the catalog diff, it is very common that lots of resources will share the same diff on various machines. This results in heavy JSON reports (I've had reports up to 30MB) with repeated diff content.
I suggest we could add deduplication to the JSON format, using a combination of size/hash as key (to be on the safish side). Something along the lines of:
I've tried it against a few reports I have here. With the demo1.json file I use for the catalog-dfif-viewer demo, I get 8% gain. On production reports, I've gained between 1% and up to 46% in size.
The gain can be improved by using an indexed array instead of pseudo-unique keys:
With this method, the demo1.json file gets a 12% gain, and my production tests give me up to 47% gain. The diff content can still be easily accessed by index:
When running the catalog diff, it is very common that lots of resources will share the same diff on various machines. This results in heavy JSON reports (I've had reports up to 30MB) with repeated diff content.
I suggest we could add deduplication to the JSON format, using a combination of size/hash as key (to be on the safish side). Something along the lines of:
I'm pretty sure this would greatly reduce the size of the JSON reports, while not greatly improving the complexity of displaying them.
Here's a little experiment on existing reports:
I've tried it against a few reports I have here. With the
demo1.json
file I use for the catalog-dfif-viewer demo, I get 8% gain. On production reports, I've gained between 1% and up to 46% in size.The gain can be improved by using an indexed array instead of pseudo-unique keys:
With this method, the
demo1.json
file gets a 12% gain, and my production tests give me up to 47% gain. The diff content can still be easily accessed by index:The text was updated successfully, but these errors were encountered: