Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#26207 closed Cleanup/optimization (fixed)

Replace dynamic classes with non-data descriptors for deferred instance loading

Reported by: Anssi Kääriäinen Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Instead of creating subclasses of the real model with descriptors for the deferred fields, always add non-data descriptors for all concrete fields. Gone is dynamic class creation for deferred loading!

Change History (8)

comment:1 by Tim Graham, 8 years ago

Has patch: set
Patch needs improvement: set
Summary: New implementation for deferred instance loadingReplace dynamic classes with non-data descriptors for deferred instance loading
Triage Stage: UnreviewedAccepted

comment:2 by Tim Graham, 8 years ago

Patch needs improvement: unset

Updated PR with cosmetic edits + docs. One TODO remains from Anssi's original PR that I'm not sure how to handle.

comment:3 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In 7f51876f:

Fixed #26207 -- Replaced dynamic classes with non-data descriptors for deferred instance loading.

comment:4 by Tim Graham <timograham@…>, 7 years ago

In 721f0ca:

Simplified a test after refs #26207.

comment:5 by Tim Graham <timograham@…>, 7 years ago

In 9d42464:

Refs #26207 -- Removed obsolete comments about deferred model classes.

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 35396a7f:

Refs #26207 -- Removed obsolete note about slow constructing a model with deferred fields.

This is not true since 7f51876 removed the necessity of creating
proxy model classes at runtime for each deferred field sets.

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 8d196e6f:

[3.0.x] Refs #26207 -- Removed obsolete note about slow constructing a model with deferred fields.

This is not true since 7f51876 removed the necessity of creating
proxy model classes at runtime for each deferred field sets.
Backport of 35396a7f243eceec42cc90725ab573a7d9ac3b4c from master

comment:8 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In f037ae11:

[2.2.x] Refs #26207 -- Removed obsolete note about slow constructing a model with deferred fields.

This is not true since 7f51876 removed the necessity of creating
proxy model classes at runtime for each deferred field sets.
Backport of 35396a7f243eceec42cc90725ab573a7d9ac3b4c from master

Note: See TracTickets for help on using tickets.
Back to Top