It's too easy to accidentally send more data from the server than you need. It would be nice if there was an easy way to see what's not being used.
Describe the proposed solution
An approach that would work in 95% of cases is to wrap data in a proxy that tracks which things get accessed during (server or client) render. The other 5% involves non-POJOs and data that's needed after the initial render. For this reason it probably can't be a loud obnoxious warning. I'm not exactly sure where the best place to surface this information would be.
Some years ago I wrote a library called object-cull that does a lot of the heavy lifting. It probably needs a spruce up but could be useful here.
Describe the problem
It's too easy to accidentally send more data from the server than you need. It would be nice if there was an easy way to see what's not being used.
Describe the proposed solution
An approach that would work in 95% of cases is to wrap
data
in a proxy that tracks which things get accessed during (server or client) render. The other 5% involves non-POJOs and data that's needed after the initial render. For this reason it probably can't be a loud obnoxious warning. I'm not exactly sure where the best place to surface this information would be.Some years ago I wrote a library called object-cull that does a lot of the heavy lifting. It probably needs a spruce up but could be useful here.
Importance
nice to have