This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » General discussion » Components being set multiple times
Components being set multiple times [message #8335] Wed, 05 July 2006 11:01 Go to next message
jeho  is currently offline 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 Go to previous messageGo to next message
vonLeeb  is currently offline 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 Go to previous messageGo to next message
Draven  is currently offline 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 #8412 is a reply to message #8344 ] Thu, 06 July 2006 13:44 Go to previous messageGo to next message
jeho  is currently offline jeho
Messages: 13
Registered: April 2006
Junior Member
vonLeeb wrote on Wed, 05 July 2006 14:02

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).
...

I didn't notice it in 6.2 but when I upgraded to 6.3 there was a major decrease in performance. Pages with many partials took more than seven times longer to load!

I'm not to familiar with the underlying logic of the framework, but could it be because the view initializes every time a partial is used?

PartialHelper::get_partial
// initialize the view
  if (!$viewInstance->initialize($context, $moduleName, $viewName))
Re: Components being set multiple times [message #8496 is a reply to message #8412 ] Sat, 08 July 2006 11:13 Go to previous messageGo to next message
vonLeeb  is currently offline vonLeeb
Messages: 74
Registered: March 2006
Member
Created a ticket on that. Let's hope Very Happy
Re: Components being set multiple times [message #9551 is a reply to message #8335 ] Fri, 28 July 2006 18:44 Go to previous messageGo to next message
halfer  is currently offline 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! Confused


Remember Palestine
Re: Components being set multiple times [message #9900 is a reply to message #8335 ] Tue, 08 August 2006 15:13 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Can we get comment from any symfonian knowledgable about the internals of the framework on this topic? I guess a number of us would like to have an idea of the ETA for this fix.

There's a couple of other major issues, such as the cache problem and sql injection opportunities. We've really embraced symfony here to the extent that it would be difficult to switch to anything else. As a result, that these have been issues for a long time makes me somewhat nervous. Could the developers perhaps post here or elsewhere on the topic of ongoing bug/security fixing?

Thanks in advance Very Happy


Remember Palestine
Re: Components being set multiple times [message #10424 is a reply to message #8335 ] Fri, 18 August 2006 15:19 Go to previous messageGo to next message
halfer  is currently offline 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 #10785 is a reply to message #10424 ] Wed, 23 August 2006 15:41 Go to previous messageGo to next message
francois  is currently offline francois
Messages: 1636
Registered: October 2005
Faithful Member
components instanciate a view since 0.6.3, thus the multiple component inclusion message (only the message actually). We are looking for a workaround.
Re: Components being set multiple times [message #10905 is a reply to message #8335 ] Fri, 25 August 2006 15:06 Go to previous message
JoSsiF  is currently offline 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
Previous Topic:[resolved] routing and id
Next Topic:{Resolved] admin_input_upload_tag returns fatal error
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software