jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • DisplayTag
  • DISPL-156

StringBuffer.append vs. JspWriter.print

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0 RC2
  • Fix Version/s: 1.0
  • Component/s: Tag Library
  • Labels:
    None

Description

The tag library builds up HTML in a StringBuffer in memory, then flushes it all out to the response at once with a single out.write(buffer).

Would it be reasonable instead to write directly to the underlying response's JspWriter so that normal JSP buffering can take place?

for example, instead of

buffer.append(getHTMLData());
write(buffer);

you would have

writeHTMLData(writer);

writeHTMLData would return void instead of String, and all of the buffer.append()'s would change to writer.write(). Subroutines like String getTableFooter(), which are only called from getHTMLData, would similarly change to void writeTableFooter(writer).

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Bill Schneider added a comment - 16/Dec/04 4:07 PM
motivation is performance, to reduce the memory footprint of using displaytag
Show
Bill Schneider added a comment - 16/Dec/04 4:07 PM motivation is performance, to reduce the memory footprint of using displaytag
Hide
Permalink
fabrizio giustina added a comment - 27/Dec/04 12:01 PM
changes in cvs for 1.0
Show
fabrizio giustina added a comment - 27/Dec/04 12:01 PM changes in cvs for 1.0
Hide
Permalink
Anonymous added a comment - 21/May/05 10:55 PM
http://www.jsvelho.org <a href="http://www.jsvelho.org">military payday loans</a> thanks
Show
Anonymous added a comment - 21/May/05 10:55 PM http://www.jsvelho.org <a href="http://www.jsvelho.org">military payday loans</a> thanks
Hide
Permalink
Anonymous added a comment - 26/May/05 11:14 PM
http://www.sneerzine.com/ <a href="http://www.sneerzine.com/">biloxi casinos</a> thanks
Show
Anonymous added a comment - 26/May/05 11:14 PM http://www.sneerzine.com/ <a href="http://www.sneerzine.com/">biloxi casinos</a> thanks
Hide
Permalink
Anonymous added a comment - 27/May/05 10:21 AM
http://www.mylosoft.com/ <a href="http://www.mylosoft.com/">world series of poker</a> thanks for your site
Show
Anonymous added a comment - 27/May/05 10:21 AM http://www.mylosoft.com/ <a href="http://www.mylosoft.com/">world series of poker</a> thanks for your site

People

  • Reporter:
    Bill Schneider
Vote (0)
Watch (0)

Dates

  • Created:
    16/Dec/04 4:07 PM
    Updated:
    27/May/05 10:21 AM
    Resolved:
    27/Dec/04 12:01 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.