I've been working with THTMLView lately (also called THTMLPort). It really would make a very good RichChat component, for me and likely for others. I've just hit one stumbling block. It appears to have no method to append data without re-parsing the entire document and this is problematic because it means adding lines takes more and more time for each line added.
Now, it does appear to be possible to make the component append data without re-parsing everything and I did attempt to add this feature myself, but it sadly seems above my skill level and I've been messing with the component for days without making progress, so I'm asking the Lazarus community for help.
However, I wanted to put as much work as possible into this and I felt bad I couldn't accomplish this on my own, so I did what I could:
1. I added an AppendFromString function to the initial component. This will append a new string to the document. That part I could do. (The part I couldn't figure out how to do was getting it to not re-parse the whole document and give correct output.)
2. I wrote a test program to show the issue. The test program will add lines to the THTMLView and time how long it takes to add them. On my machine adding the first line takes 15-24 milliseconds. For the next while the lines add at 0-1 milliseconds. However once you are further in the delay increases, in what looks like a linear fashion, to a second and greater. Eventually this delay will start lagging the chat so that you type/click something nothing will be added to the chat for seconds. Theoretically, giving the component the ability to only parse and add the newest line, rather than re-parsing the entire document should fix this.
You can download both the modified component and the test program here:
http://www.mediamarksman.com/HelpWithRichChat.zipIf you are willing to help, download, unzip and then install the modified THTMLView in THTMLPort\package\htmlcomp.lpk. After the HTMLView component is installed, you can open the test program in the RichChatTest folder.
You can also read more info about THTMLView and what the goal is in the forum thread where this idea started here:
http://www.lazarus.freepascal.org/index.php/topic,17112.0.htmlI will be very grateful for any help anyone can offer.