Good evening.
I am using Basic 4 PPC to build an application for Mobile Phones to act as a client to play MUD's. MUD's are text based multiplayer games (check more info in wikipedia, if you wish), and in resume clients to play those games are terminals that simply read and write text.
There are some protocols MUD server's use like colouring parts of text, that clients should be able to decypher. As I wanted to implement colours in my B4PPC MUD client, I realized I couldn't use text boxes to show coloured incoming text.
After a bit of search I've found out that HTML Panel should be the better solution to show incoming text, and so I did it. It runs ok on Desktop, and in my pocket device runs a little slower (is supposed to act this way).
The problem is that the more text it receives, the slower it becomes, and finally shoots an "Out of memory exception".
Two things before finishing the post:
- Usually, per each 10 lines of received text (like a paragraph, or so), considering I need to adjust it with HTML tags for changing font color multiple times, need to loop to read each character after special entities characters and adjust to proper HTML references, etc, incoming text ends up in HTML panel with something like 5 times bigger than when received.
- I know that if I receive a lot of text (I can fill a 50 page text document after playing a MUD for one hour) HTML text gets bigger and bigger. To avoid it, each time text reaches 6kb of text I erase first 3kb and just keep last 3kb, so I can still keep a small log of old text and not use too much memory
So why I still receive such exception?
Thanks in advance
I am using Basic 4 PPC to build an application for Mobile Phones to act as a client to play MUD's. MUD's are text based multiplayer games (check more info in wikipedia, if you wish), and in resume clients to play those games are terminals that simply read and write text.
There are some protocols MUD server's use like colouring parts of text, that clients should be able to decypher. As I wanted to implement colours in my B4PPC MUD client, I realized I couldn't use text boxes to show coloured incoming text.
After a bit of search I've found out that HTML Panel should be the better solution to show incoming text, and so I did it. It runs ok on Desktop, and in my pocket device runs a little slower (is supposed to act this way).
The problem is that the more text it receives, the slower it becomes, and finally shoots an "Out of memory exception".
Two things before finishing the post:
- Usually, per each 10 lines of received text (like a paragraph, or so), considering I need to adjust it with HTML tags for changing font color multiple times, need to loop to read each character after special entities characters and adjust to proper HTML references, etc, incoming text ends up in HTML panel with something like 5 times bigger than when received.
- I know that if I receive a lot of text (I can fill a 50 page text document after playing a MUD for one hour) HTML text gets bigger and bigger. To avoid it, each time text reaches 6kb of text I erase first 3kb and just keep last 3kb, so I can still keep a small log of old text and not use too much memory
So why I still receive such exception?
Thanks in advance