RichFaces rich:insert takes a long time to output large files

Posted by Mark Lewis on Stack Overflow See other posts from Stack Overflow or by Mark Lewis
Published on 2010-03-18T18:00:08Z Indexed on 2010/03/18 18:01 UTC
Read the original article Hit count: 497

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about richfaces

Related posts about jsf