I developed iris-log-viewer on a work laptop using an older version of IRIS. My messages.log file has nearly 10k lines. I noticed it takes a couple of seconds to read messages.log file line by line, import each line into a persistent class, and display messages on my screen. I wonder if Python can speed up the process.

 

I developed EmbeddedPython class. Initially I imported a python script file to read messages.log file in Python. Later I figured out how to write a Python classMethod where I invoke IRIS classMethod to import one line at a time while reading messages.log.

 

I developed irislogreader class where I measure how long it takes to read messages.log file and import it line by line. ClassMethod Test1 utilizes IRIS code. ClassMethod Test2 utilizes Python code.

 

I ran both Test1 and Test2 on iris-log-viewer deployed on a free tier EC2 in AWS. Test2 using Python ran slightly faster than Test1 using IRIS. I plan to run more tests using larger messages.log files.

 

Update 2/5/2023: I tested using a 5 MB messages.log file. I ran into an error documented here:

https://community.intersystems.com/post/error-reading-messageslog-file-using-embedded-python-iris-log-viewer