-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix massive DSO-API performance issue, due to deepcopy()
DRF performs a deepcopy() of the serializer._declared_fields before it will handle the request. This is analogous to how Django forms work, and allows updating the fields with request state and 'parent' references. Since the deepcopy() also touched dataset definitions of Amsterdam Schema, it basically took 14sec to copy all those dicts as well. This can be avoided, bringing to performance of DSO-API back to reasonable levels.
- Loading branch information
Showing
3 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f078098
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lokaal getest (Django zonder debug):
bag panden lijst: 4429ms -> 145ms
bag nummeraanduiding: 4850ms -> 59ms
bag nummeraanduiding met expand: 11276ms -> 163ms