What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » WLM Plus! General » Log Viewer is slow with large chat logs

Log Viewer is slow with large chat logs
Author: Message:
garreh
New Member
*


Posts: 4
Joined: Feb 2008
O.P. Log Viewer is slow with large chat logs
Decrypting a log file which is 2.75MB takes an agonising 26 seconds. It's the 8th -- and I dare think what the log file size will be by the end of the month, and how long the LogViewer will take to show me the log!

Is there anyway chance of improving the speed Patchou?
02-08-2008 10:05 PM
Profile E-Mail PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: Log Viewer is slow with large chat logs
well, it shouldn't take that long... it depends on your system specs really. All I can suggest is to decrease the encryption key size (preferences), that's what will make the most difference (for future generated log files).
[Image: signature2.gif]
02-08-2008 10:11 PM
Profile PM Web Find Quote Report
garreh
New Member
*


Posts: 4
Joined: Feb 2008
O.P. RE: Log Viewer is slow with large chat logs
Thanks for your reply Patchou.

My system spec isn't too flashy... AMD AthlonXP @ 2.21GHz.

Encryption key size is 640.

Does the Log Viewer decrypt and write to the HTML file as its going along? Or does it decrypt, then generate a HTML file?
02-08-2008 10:24 PM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Log Viewer is slow with large chat logs
Basically, encrypted log files are HTML files which were encrypted by Plus! Live. When Plus! opens the log file, it checks the given password by decrypting a known signature in the log file and if that result matches the original signature, it decrypts the whole log file and stores it in a temporary location. Then, it loads that file in the Log Viewer window. In fact, you can encrypt any type of file with the Plus! encryption, and it'll work perfectly fine.

In my opinion, 2.75 MB for a log file is quite huge, assuming that they're just HTML files. HTML is just text, the images (smilies, wink thumbnails and the like) are stored in a subdirectory in the logs folder. So, I think that 2.75 MB of logged chat messages is quite big for a period of 8 days, and I doubt you have lots of other huge log files. Maybe you're just chatting too much? :grin:
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
02-09-2008 09:27 AM
Profile E-Mail PM Web Find Quote Report
garreh
New Member
*


Posts: 4
Joined: Feb 2008
O.P. RE: Log Viewer is slow with large chat logs
Thanks for your reply Mattike.

Yes maybe I should tell her to
stop
writing
like
this...

And spamming me with nudges :P

But on a serious note.

Is there any chance of future versions of Messenger Plus! to incorporate 7zip to --

Output: Generate HTML File --> 7zip (via command line, compress and output to file) --> Encrypt log --> Output to .ple
Input: Decrypt log --> 7zip decompress and output to HTML file --> Show log in viewer

Compressing a 2.75MB HTML file with 7zip outputs, approximately, a 114KB file.

Imagine the speed difference in encrypting and decrypting a 114KB file over a 2.75MB file!

As quoted from http://www.7-zip.org/license.txt
quote:
Note:
    You can use 7-Zip on any computer, including a computer in a commercial
    organization. You don't need to register or pay for 7-Zip.

02-09-2008 02:52 PM
Profile E-Mail PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: Log Viewer is slow with large chat logs
Ziping before encrypting could be a good idea, the problem however is that logs, by nature, are ever growing files. Compressing each block in the file could be prone to error and cause many differnt kinds of problems. Still, I'll keep that in mind.
[Image: signature2.gif]
02-13-2008 06:29 PM
Profile PM Web Find Quote Report
garreh
New Member
*


Posts: 4
Joined: Feb 2008
O.P. RE: Log Viewer is slow with large chat logs
Yes, Patchou -- This is the problem with zipping. However, even now, without much change, filesizes could be reduced by over half in most cases...

code:
  <tr><th><span class="time">(16:06)</span> Gary: </th><td style="font-family:&quot;Georgia&quot;;color:#000080;font-weight:bold;">almost got parking ticket</td></tr>
166 bytes


This line could be reduced to simply...

code:
<tr><th><i>(16:06)</i> Gary: </th><td class="a">almost got parking ticket</td></tr>
83 bytes -- 50% Reduction

So what did I do?

1: Replaced <span class="time"> to <i> and also replaced the CSS entry     .mplsession table th span.time {color:#949494;font-weight:normal;} with...

code:
    .mplsession table tr i {font-style:normal;color:#949494;font-weight:normal;}

2: Replaced style="X" with class="a" ... How this works is by adding an entry to CSS like so...

code:
    td.a { font-family:Georgia;color:#000080;font-weight:bold; }
    td.b { font-family:"Microsoft Sans Serif";color:#FF00FF; }

a relates to one persons colour, and b for another, more can be added obviously like c, d, e, f, .... you get the picture.

A simple function could be made AddCssColour(<css code>) and simply use base 26 to increment. Then GetCurrentCssColour(<contact id>) to get the CSS class name.

I also removed trailing spaces and newlines, which removes a further 4 bytes for every line, which would amount to 23KB of pure junk over 6000 lines, why not?

-------------

Using these simple changes:

Original filesize: 2.13MB
New, reduced filesize: 1.16MB - 54% reduction!

Not only would files load twice as quick, it would reduce amount of data in memory, amount being written to disk and increase encrypting and decrypting speed.

These changes wouldn't affect old log files, but I think could easily be incorporated to improve future versions of Plus!
02-13-2008 10:06 PM
Profile E-Mail PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: Log Viewer is slow with large chat logs
you just can't add this kind of thing in html logs... remember that log files grow, the header, once written in the file, cannot be changed.
[Image: signature2.gif]
02-13-2008 10:52 PM
Profile PM Web Find Quote Report
ahmetgns
Veteran Member
*****

Avatar

Posts: 1343
Reputation: 8
39 / Male / Flag
Joined: Dec 2006
RE: Log Viewer is slow with large chat logs
By the way, I found an annoying thing which may grow html files rapidly.

When people use Plus! formatting tags, if they write like [b]hel[/b][b]lo[/b], then in log file it looks like
code:
<span font-weight:bold>hel</span><<span font-weight:bold>lo</span>
As you see, there are two bold information when not needed. I know, noone inserts tags like that. However the important thing is if user give a gradient effect to his messages with other formatting like bold or italic, then these bold and italic informations are written in html files for each letter.For example, if user sends a message like[b][c=4]Hello my contact[/c=8][/b] then the result in html file is
code:
<span font-weight:bold; color=fffff>   H   </span>
<span font-weight:bold; color=ffff00>   e   </span>
...
..
.
<span font-weight:bold; color=fcfc32>   t   </span>
This problems arises in nicknames mostly, because people can give formats other than gradient effect to their messages from original Messenger's font option (and this will not cause this duplicate entry problem for each letter) but for display names if people make their name bold&italic&underlined and give a gradient color, then for each letter, the bold&italic&underlined infos are written seperately. And this is unnecessary I think. If possible, please optimize logging of texts formatted like that.
02-29-2008 12:01 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On