Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Works in tandem with the draft PR in schematools. There, you will find an example schema as well.
It basically nulls fields at the very last moment in the serializer.
I tested it locally by importing the example schema and generating ~100k records, about half of which have an adres_afgeschermd flag set to true. I then experimented with different _pageSize params on my local machine. At _pageSize=100000, the backend generates a response in ~9 seconds without the code in this draft (the browsable api takes quite a bit longer to display this, I've noticed). With the code I've added, the response is generated in ~10.3 seconds, an increase of ~15%. For pagesizes of 20-1000 the difference is hardly noticable.
Note: tests obviously fail because it doesn't use the right schematools here.