Ticket #116 (closed enhancement: fixed)
Implement MSN Plus! features
| Reported by: | amroth | Owned by: | amroth |
|---|---|---|---|
| Priority: | someday | Milestone: | open |
| Component: | GUI - Chat window | Version: | 1.5 |
| Keywords: | Cc: |
Description (last modified by amroth) (diff)
MSN and WLM are often not used alone by themselves; many people will install an add-on, "MSN Plus!" ( available at http://www.msgpluslive.net/ ), which enhances the MSN experience with a lot of new features.
One of them is coloring nicknames (and text messages, too) by usage of text formatting tags: IRC-like style (·#bold·0), or BBCode-like style ([b]bold[/b]).
I've implemented a first approach at this one problem. The patch I've attached here is able to parse codes in chats (both in friendly names and text messages) and in the contact list (only the friendly names, not the contacts' personal messages). Parsing the codes can be independently enabled using two checkboxes in the Chatting Settings - they aren't enabled by default. When they are disabled, the codes are only stripped away from the nicknames and messages.
The patch also contains a modified version of the Chatting Settings which uses tabs to separate different kinds of chatting options. That modify was required to make room for the two new options. I'll post in a separate ticket the modified page alone, to see if it's worth implementing it alone and separately from this patch.
The MsnPlus patch needs A LOT more optimization: the patch at the moment makes KMess quite heavier in terms of CPU time, since it makes wide use of regular expressions. Still I've already optimized it a lot, it doesn't parse strings which don't contain formatting codes, and caches the last 100 formatted strings to avoid formatting them again soon.
A future optimization will be cleaning tags from strings without using regular expressions; and maybe, avoid parsing formatted nicknames if the two new formatting options are turned off. Two things that would make KMess very close to the current SVN revision.
Here is the current memory footprint: kmess-current is the patched KMess, kmess-svn is revision 2015 as in the repo.
big account: 160 contacts in friend list, ~250 in all lists
7582 amroth 15 0 73636 39m 20m S 0.0 3.9 0:08.01 kmess-current 5907 amroth 15 0 73784 39m 20m S 2.3 3.9 0:05.95 kmess-svn
73636/73084 (kb) is the "Virtual Image size", the total amount of virtual memory used by the task. It includes all code, data and shared libraries plus pages that have been swapped out.
39m is the "Resident size", the non-swapped physical memory a task has used.
20m is the "Shared Mem size", the amount of shared memory used by a task. It simply reflects memory that could be potentially shared with other processes (for example, the Qt's libraries are shared between all KDE and Qt apps).
small account: 4 contacts in friend list, ~10 in all lists
4778 amroth 15 0 67476 30m 18m S 0.0 3.0 0:02.80 kmess-current 4788 amroth 15 0 67164 30m 18m S 0.0 3.0 0:01.21 kmess-svn
Same fields apply here,
67476/67164 Virtual Image size
30m Resident size
18m Shared Mem size
Discuss!

