| Components being set multiple times [message #8335] |
Wed, 05 July 2006 11:01  |
jeho Messages: 13 Registered: April 2006 |
Junior Member |
|
|
After upgrading from 0.6.2 to 0.6.3, every time I use a partial "set component" is being called by ViewConfig, according to the log, for each of my globaly declared components.
At the moment Im iterating through a list with about 30 entries and for each entry i use two partials. This means all my components are being set about 60 times each... This did not happen before the upgrade.
55 Info +5 PHPView execute view for template "_list_all.php"
56 Info +4 PHPView render "sf_app_dir\modules/stuff/templates/_list_all.php"
57 Info +52 ViewConfig set component "topNav" (topNav/default)
58 Info +1 ViewConfig set component "tabs" (topNav/tabs)
59 Info +1 ViewConfig set component "searchfilter" (searchfilter/s)
60 Info +5 PHPView execute view for template "_block.php"
61 Info +5 PHPView render "sf_app_dir\modules/stuff/templates/_block.php"
62 Info +55 ViewConfig set component "topNav" (topNav/default)
63 Info +1 ViewConfig set component "tabs" (topNav/tabs)
64 Info +1 ViewConfig set component "searchfilter" (searchfilter/s)
65 Info +5 PHPView execute view for template "_info.php"
66 Info +4 PHPView render "sf_app_dir\modules/stuff/templates/_info.php"
67 Info +122 ViewConfig set component "topNav" (topNav/default)
68 Info +1 ViewConfig set component "tabs" (topNav/tabs)
69 Info +1 ViewConfig set component "searchfilter" (searchfilter/s)
70 Info +5 PHPView execute view for template "_block.php"
71 Info +4 PHPView render "sf_app_dir\modules/stuff/templates/_block.php"
72 Info +52 ViewConfig set component "topNav" (topNav/default)
73 Info +1 ViewConfig set component "tabs" (topNav/tabs)
74 Info +1 ViewConfig set component "searchfilter" (searchfilter/s)
75 Info +5 PHPView execute view for template "_info.php"
76 Info +4 PHPView render "sf_app_dir\modules/stuff/templates/_info.php"
77 Info +67 ViewConfig set component "topNav" (topNav/default)
78 Info +1 ViewConfig set component "tabs" (topNav/tabs)
79 Info +1 ViewConfig set component "searchfilter" (searchfilter/s)
Anyone else experienced this? Any ideas?
[Win2003, Apache 2.0.55, PHP 5.1.2]
|
|
|
| Re: Components being set multiple times [message #8344 is a reply to message #8335 ] |
Wed, 05 July 2006 14:02   |
vonLeeb Messages: 74 Registered: March 2006 |
Member |
|
|
Yeap, I ditto.
I found it a problem already in 6.2, but had no single replay to my post, alas, on that matter. It downgrades perfomance significantly (see ms needed to set multiple time the same component).
Because of that I dropped so far an idea of having many components on my layout and replaced them by partials. I'm too waiting for a comment from gurus on that subject.
vl
[Updated on: Wed, 05 July 2006 14:02]
|
|
|
| Re: Components being set multiple times [message #8347 is a reply to message #8335 ] |
Wed, 05 July 2006 15:02   |
Draven Messages: 760 Registered: January 2006 |
Faithful Member |
|
|
|
I also noticed the same thing when I was working out a problem with component caching. Perhaps this should have a ticket opened or a request for an enhancement to improve performance?
[Updated on: Wed, 05 July 2006 15:02]
|
|
|
|
|
| Re: Components being set multiple times [message #9551 is a reply to message #8335 ] |
Fri, 28 July 2006 18:44   |
halfer Messages: 9535 Registered: January 2006 Location: West Midlands, UK |
Faithful Member |
|
|
Major issue here on v0.6.3 stable - the admin generator appears to do something to the page that prompts component execution elsewhere to be repeated unnecessarily. I have three fairly quick components for menus etc and with an admin generator they are being called around 40 times each, hence the page load time of 15 sec! (debug mode).
See attached screenshot!
Remember Palestine
|
|
|
|
| Re: Components being set multiple times [message #10424 is a reply to message #8335 ] |
Fri, 18 August 2006 15:19   |
halfer Messages: 9535 Registered: January 2006 Location: West Midlands, UK |
Faithful Member |
|
|
|
FYI, the repetition in the screenshot above, notes Draven, is due to a logging bug, not a caching error as I suspected. I will raise a ticket on it.
[Updated on: Fri, 18 August 2006 15:19] Remember Palestine
|
|
|
|
| Re: Components being set multiple times [message #10905 is a reply to message #8335 ] |
Fri, 25 August 2006 15:06  |
JoSsiF Messages: 51 Registered: June 2006 Location: Germany |
Member |
|
|
| jeho wrote on Wed, 05 July 2006 11:01 | After upgrading from 0.6.2 to 0.6.3, every time I use a partial "set component" is being called by ViewConfig, according to the log, for each of my globaly declared components.
|
I experienced the same thing.
What i've done is removing the component entries in the application-wide view config (apps/%appname%/config/view.yml). Further, I've set the component entries in the corresponding modules not for "all" templates, but specifically for each of them. So the partials won't call "set component". That's a bit annoying, but at the moment i'm quite happy having it solved.
Anyway, there are heavy speed problems using many partials, even if there's only a couple of them, but included certain times. This might be the case in larger listings.
For my convenience, I moved the code for displaying a single table cell into a partial, since then style manipulations can be done easily and fast. I remember some words in the askeet tutorial saying that symfony is made for lazy folks, and I relied on that. The result is that my listing of about 30 records takes ages (on a brand new machine!), and this is not a propel problem as someone might think. The log and debug messages proof that the bottleneck is the rendering of the views.
So I guess the only solution is to write large, unreadable and unhandy templates. At least at the moment.
cheers
JoSsiF
|
|
|