You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Michael Wyraz (JIRA)" <ji...@apache.org> on 2010/07/13 14:00:54 UTC

[jira] Created: (TAP5-1206) @IncludeStylesheet slows down component rendering

@IncludeStylesheet slows down component rendering
-------------------------------------------------

                 Key: TAP5-1206
                 URL: https://issues.apache.org/jira/browse/TAP5-1206
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
            Reporter: Michael Wyraz


We have a component (Button with it's own css) that is rendered multiple times into a table (in some cases >3000 times). The css is included via @IncludeStylesheet. Rendering 3000 of this buttons requires about 6-7 seconds on server side. When I change the button code to:

	@Inject
	private RenderSupport renderSupport;
	
	@Inject
	@Path("ActionButton.css")
	private Asset stylesheet;
	
	@SetupRender
	public void setup()
	{
		renderSupport.addStylesheetLink(stylesheet, null);
	}

(instead of @IncludeStylesheet) rendering happens in less than 1 second. So I guess that the inserted code is very inefficient and should be replaced by something like the code above.

(whish) If you touch the code, please add a media attribute to the annotation ;-)



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1206) @IncludeStylesheet slows down component rendering

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887834#action_12887834 ] 

Howard M. Lewis Ship commented on TAP5-1206:
--------------------------------------------

That's interesting. It must be a difference in how the Assets are resolved and cached, since the generated logic is virtually identical to what you have there.  All of this stuff has been reworked in Tapestry 5.2 and we're just getting to the profiling stage.

> @IncludeStylesheet slows down component rendering
> -------------------------------------------------
>
>                 Key: TAP5-1206
>                 URL: https://issues.apache.org/jira/browse/TAP5-1206
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Michael Wyraz
>
> We have a component (Button with it's own css) that is rendered multiple times into a table (in some cases >3000 times). The css is included via @IncludeStylesheet. Rendering 3000 of this buttons requires about 6-7 seconds on server side. When I change the button code to:
> 	@Inject
> 	private RenderSupport renderSupport;
> 	
> 	@Inject
> 	@Path("ActionButton.css")
> 	private Asset stylesheet;
> 	
> 	@SetupRender
> 	public void setup()
> 	{
> 		renderSupport.addStylesheetLink(stylesheet, null);
> 	}
> (instead of @IncludeStylesheet) rendering happens in less than 1 second. So I guess that the inserted code is very inefficient and should be replaced by something like the code above.
> (whish) If you touch the code, please add a media attribute to the annotation ;-)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-1206) @IncludeStylesheet slows down component rendering

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1206.
--------------------------------------

    Resolution: Won't Fix

Again, an upgrade to 5.1 (and a swtich to the @Import annotation) will resolve your issue; you also have a workaround.

> @IncludeStylesheet slows down component rendering
> -------------------------------------------------
>
>                 Key: TAP5-1206
>                 URL: https://issues.apache.org/jira/browse/TAP5-1206
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Michael Wyraz
>
> We have a component (Button with it's own css) that is rendered multiple times into a table (in some cases >3000 times). The css is included via @IncludeStylesheet. Rendering 3000 of this buttons requires about 6-7 seconds on server side. When I change the button code to:
> 	@Inject
> 	private RenderSupport renderSupport;
> 	
> 	@Inject
> 	@Path("ActionButton.css")
> 	private Asset stylesheet;
> 	
> 	@SetupRender
> 	public void setup()
> 	{
> 		renderSupport.addStylesheetLink(stylesheet, null);
> 	}
> (instead of @IncludeStylesheet) rendering happens in less than 1 second. So I guess that the inserted code is very inefficient and should be replaced by something like the code above.
> (whish) If you touch the code, please add a media attribute to the annotation ;-)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1206) @IncludeStylesheet slows down component rendering

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1206:
---------------------------------------


Looking over the code there is a significant difference between the 5.1 implementation and the 5.2.

In 5.1, the assets are re-resolved inside the setup render phase; that means on each render, the AssetSource is used to locate the Asset (localized).

In 5.2, the revised IncludeStylesheetWorker and its replacement, ImportWorker, are careful to resolve the Assets once, during the containingPageDidLoad() lifecycle method, which is equivalent to your sample code that injects the Asset.  I don't think you'll see the same performance issues in 5.2.

> @IncludeStylesheet slows down component rendering
> -------------------------------------------------
>
>                 Key: TAP5-1206
>                 URL: https://issues.apache.org/jira/browse/TAP5-1206
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Michael Wyraz
>
> We have a component (Button with it's own css) that is rendered multiple times into a table (in some cases >3000 times). The css is included via @IncludeStylesheet. Rendering 3000 of this buttons requires about 6-7 seconds on server side. When I change the button code to:
> 	@Inject
> 	private RenderSupport renderSupport;
> 	
> 	@Inject
> 	@Path("ActionButton.css")
> 	private Asset stylesheet;
> 	
> 	@SetupRender
> 	public void setup()
> 	{
> 		renderSupport.addStylesheetLink(stylesheet, null);
> 	}
> (instead of @IncludeStylesheet) rendering happens in less than 1 second. So I guess that the inserted code is very inefficient and should be replaced by something like the code above.
> (whish) If you touch the code, please add a media attribute to the annotation ;-)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-1206) @IncludeStylesheet slows down component rendering

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1206.
--------------------------------------

    Resolution: Won't Fix

Again, an upgrade to 5.1 (and a swtich to the @Import annotation) will resolve your issue; you also have a workaround.

> @IncludeStylesheet slows down component rendering
> -------------------------------------------------
>
>                 Key: TAP5-1206
>                 URL: https://issues.apache.org/jira/browse/TAP5-1206
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Michael Wyraz
>
> We have a component (Button with it's own css) that is rendered multiple times into a table (in some cases >3000 times). The css is included via @IncludeStylesheet. Rendering 3000 of this buttons requires about 6-7 seconds on server side. When I change the button code to:
> 	@Inject
> 	private RenderSupport renderSupport;
> 	
> 	@Inject
> 	@Path("ActionButton.css")
> 	private Asset stylesheet;
> 	
> 	@SetupRender
> 	public void setup()
> 	{
> 		renderSupport.addStylesheetLink(stylesheet, null);
> 	}
> (instead of @IncludeStylesheet) rendering happens in less than 1 second. So I guess that the inserted code is very inefficient and should be replaced by something like the code above.
> (whish) If you touch the code, please add a media attribute to the annotation ;-)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1206) @IncludeStylesheet slows down component rendering

Posted by "Michael Wyraz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Wyraz updated TAP5-1206:
--------------------------------

    Affects Version/s: 5.1.0.5

> @IncludeStylesheet slows down component rendering
> -------------------------------------------------
>
>                 Key: TAP5-1206
>                 URL: https://issues.apache.org/jira/browse/TAP5-1206
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Michael Wyraz
>
> We have a component (Button with it's own css) that is rendered multiple times into a table (in some cases >3000 times). The css is included via @IncludeStylesheet. Rendering 3000 of this buttons requires about 6-7 seconds on server side. When I change the button code to:
> 	@Inject
> 	private RenderSupport renderSupport;
> 	
> 	@Inject
> 	@Path("ActionButton.css")
> 	private Asset stylesheet;
> 	
> 	@SetupRender
> 	public void setup()
> 	{
> 		renderSupport.addStylesheetLink(stylesheet, null);
> 	}
> (instead of @IncludeStylesheet) rendering happens in less than 1 second. So I guess that the inserted code is very inefficient and should be replaced by something like the code above.
> (whish) If you touch the code, please add a media attribute to the annotation ;-)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1206) @IncludeStylesheet slows down component rendering

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1206:
---------------------------------------


Looking over the code there is a significant difference between the 5.1 implementation and the 5.2.

In 5.1, the assets are re-resolved inside the setup render phase; that means on each render, the AssetSource is used to locate the Asset (localized).

In 5.2, the revised IncludeStylesheetWorker and its replacement, ImportWorker, are careful to resolve the Assets once, during the containingPageDidLoad() lifecycle method, which is equivalent to your sample code that injects the Asset.  I don't think you'll see the same performance issues in 5.2.

> @IncludeStylesheet slows down component rendering
> -------------------------------------------------
>
>                 Key: TAP5-1206
>                 URL: https://issues.apache.org/jira/browse/TAP5-1206
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Michael Wyraz
>
> We have a component (Button with it's own css) that is rendered multiple times into a table (in some cases >3000 times). The css is included via @IncludeStylesheet. Rendering 3000 of this buttons requires about 6-7 seconds on server side. When I change the button code to:
> 	@Inject
> 	private RenderSupport renderSupport;
> 	
> 	@Inject
> 	@Path("ActionButton.css")
> 	private Asset stylesheet;
> 	
> 	@SetupRender
> 	public void setup()
> 	{
> 		renderSupport.addStylesheetLink(stylesheet, null);
> 	}
> (instead of @IncludeStylesheet) rendering happens in less than 1 second. So I guess that the inserted code is very inefficient and should be replaced by something like the code above.
> (whish) If you touch the code, please add a media attribute to the annotation ;-)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1206) @IncludeStylesheet slows down component rendering

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887834#action_12887834 ] 

Howard M. Lewis Ship commented on TAP5-1206:
--------------------------------------------

That's interesting. It must be a difference in how the Assets are resolved and cached, since the generated logic is virtually identical to what you have there.  All of this stuff has been reworked in Tapestry 5.2 and we're just getting to the profiling stage.

> @IncludeStylesheet slows down component rendering
> -------------------------------------------------
>
>                 Key: TAP5-1206
>                 URL: https://issues.apache.org/jira/browse/TAP5-1206
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Michael Wyraz
>
> We have a component (Button with it's own css) that is rendered multiple times into a table (in some cases >3000 times). The css is included via @IncludeStylesheet. Rendering 3000 of this buttons requires about 6-7 seconds on server side. When I change the button code to:
> 	@Inject
> 	private RenderSupport renderSupport;
> 	
> 	@Inject
> 	@Path("ActionButton.css")
> 	private Asset stylesheet;
> 	
> 	@SetupRender
> 	public void setup()
> 	{
> 		renderSupport.addStylesheetLink(stylesheet, null);
> 	}
> (instead of @IncludeStylesheet) rendering happens in less than 1 second. So I guess that the inserted code is very inefficient and should be replaced by something like the code above.
> (whish) If you touch the code, please add a media attribute to the annotation ;-)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1206) @IncludeStylesheet slows down component rendering

Posted by "Michael Wyraz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Wyraz updated TAP5-1206:
--------------------------------

    Affects Version/s: 5.1.0.5

> @IncludeStylesheet slows down component rendering
> -------------------------------------------------
>
>                 Key: TAP5-1206
>                 URL: https://issues.apache.org/jira/browse/TAP5-1206
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Michael Wyraz
>
> We have a component (Button with it's own css) that is rendered multiple times into a table (in some cases >3000 times). The css is included via @IncludeStylesheet. Rendering 3000 of this buttons requires about 6-7 seconds on server side. When I change the button code to:
> 	@Inject
> 	private RenderSupport renderSupport;
> 	
> 	@Inject
> 	@Path("ActionButton.css")
> 	private Asset stylesheet;
> 	
> 	@SetupRender
> 	public void setup()
> 	{
> 		renderSupport.addStylesheetLink(stylesheet, null);
> 	}
> (instead of @IncludeStylesheet) rendering happens in less than 1 second. So I guess that the inserted code is very inefficient and should be replaced by something like the code above.
> (whish) If you touch the code, please add a media attribute to the annotation ;-)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.