RichFaces rich:insert takes a long time to output large files
- by Mark Lewis
Hello
I'm using a RichFaces <rich:insert like this:
<rich:panel header="my head">
<a4j:outputPanel ajaxRendered="true">
<rich:insert src="#{MyBacking.myPath}" highlight="groovy" />
</a4j:outputPanel>
</rich:panel>
If I have a 60k file to output, it takes 23 seconds. I've got a requirement to output the contents of some larger files than that and obviously the larger the file, the larger the wait for content. The recommendation in the answer to another related question is to introduce paging. I will, but the question is, why does it take so long to output 60k of text using JSF/RichFaces? That is, reading off a local disk with Windows XP SP2 PC - I can see from the log the data has already been written to disk from the network.
Other scripting languages appear to be faster than this - is it something to do with the JSF lifecycle having to handle the text maybe?
Thanks