Are you building this in a tight loop or something? What's slow about it, how long does that single line take?
On Sun, Sep 4, 2011 at 5:02 PM, bob <[email protected]> wrote: > I am seeing some remarkable slowness in code like this: > > String html = "<html><head><style type=\"text/css\">tr:nth-child(odd) > { background-color: rgba(0, 0, 0, 1.0); }" > + " tr:nth-child(even) { background-color: > rgba(0, 0, 0, 1.0); } > td { padding: 4px; font-size: 13px; } " > + "body { color: white; font-family: > \"Helvetica Neue\"; padding: > 0; border: 0; margin: 0;" > + "}" + > > "</style></head><body bgcolor=0><table > width=320 border=0>"; > > String dotline = "<tr><td colspan=4 align=center><font > color=#aed136 > size=3px><b>· · · · · · > · · · · · · · > · · · · · · · > · · · · · · · > · · · ·</td></tr>"; > html += dotline; > html += "<tr><td/><td align=center><font > color=#aed136><b>TEAMS</ > td><td align=center><font color=#aed136><b>TIME</td></tr>\n"; > > > The only thing I can think of is that I ought to use a StringBuffer to > build the HTML. Can a mistake like that really cause so much > slowness? > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

