Hi,
Kindly, look at the following problem.
Objective: To draw a message sequence chart (MSC) from given log file.
Input: Generated trace file (eg log.trace)
Output: log.trace.html
Strategy used:
Log file (input) — (process with perl) — generated html file (output)
The perl will process input log file & it will generate a html file, which we will open using any web browser.
Java script is being used, as html is unable to draw graphics. I am using a java script library (wz_jsgraphics.js) which provide simple line drawing, text display facility with appropriate size & color.
I am calling this library in my program (html file) to get the proper output.
Problem: This program works fine for small number of messages. For large number of message browser complaints:
A script of this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive.
Do you want to abort the script?
Yes No
I tried it on FireFox but again FireFox complaints about size of script, & it continuously asks user to abort or continue with this script).
Improvement to problem: If I just shuffle around & minimize the computational time (for example : priting all vertical lines in one shot (since I know how many vertical lines are to be printed), Further, if I group all the messages coming out from one layer/module & print them performance enhances.
But such delta improvements were not enough as the input file might contain more than 5k messages as a result, there are issues as mentioned above.
kindly look into this issue & give me some pointers as to how to proceed further ?
Thanks & Regards,
Raman
Encl :
log2msc.zip
this zip file contains :
log2msc.pl : perl script
small_log.trace.html : html file for small log (output file as it should be)
big_log : big log file (which giving problem)
wz_jsgraphics : java script library
[upl-file uuid=4a06ad70-f8e0-40c5-b358-084f3c045b6c size=84kB]log2html.zip