Ticket #886 (closed defect: fixed)
[Import] 0.9 -> 0.10 : Doctrine_Import_Schema :: parseSchema is 100 times slower
| Reported by: | David.Stendardi | Owned by: | lsmith |
|---|---|---|---|
| Priority: | major | Milestone: | 0.10.4 |
| Component: | Import/Export | Version: | 0.10.0 |
| Severity: | Keywords: | ||
| Cc: | Has Test: | ||
| Status: | Has Patch: |
Description
after some investigations i found that method Doctrine_Import_Schema has a gap in performance between revision 3884 & 4024 due to a repeated call to Doctrine_Lib :: getValidators()
This repeated calls to this method inside 2 foreach statements is a waste of resource. Because Doctrine_Lib :: getValidators appear only In Doctrine_Import_Schema, i propose in the attached patch to move it inside Doctrine_Import_Schema and to remove the static property, in order to be able to cache the returned results inside a class parameter.
r 3884 performances of parseSchema on ten models
took 0.12243008613586 took 0.0047562122344971 took 0.0058200359344482 took 0.0088448524475098 took 0.0048718452453613 took 0.0041599273681641 took 0.0037109851837158 took 0.0054349899291992 took 0.0025849342346191 took 0.0070021152496338 took 0.002100944519043
r 4024 performances of parseSchema on ten models
took 5.7058351039886 took 2.4626920223236 took 1.7974109649658 took 3.806694984436 took 2.4987230300903 took 2.0322449207306 took 1.5675988197327 took 2.6904540061951 took 0.89821290969849 took 2.0223588943481
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
