<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Again I am still undecided which way this should go but I was also wondering about the speed difference if we used the C-based parser in PyYAML (<a href="http://pyyaml.org/wiki/LibYAML" class="">http://pyyaml.org/wiki/LibYAML</a>).</div><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 13, 2016, at 12:19 AM, Adam Nemet <<a href="mailto:anemet@apple.com" class="">anemet@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Bob,<div class=""><br class=""></div><div class="">I am glad you’re finding opt-viewer useful.  I am generally fine this being rewritten in C++.  The idea was that once the prototype proves itself to be useful this would be considered.</div><div class=""><br class=""></div><div class="">Do you have ideas how to get syntax highlighting implemented?  In Python, Pygments makes this easy.</div><div class=""><br class=""></div><div class="">Another usage model I was considering is for people who ssh to remote servers for their builds.  In this case it should be easy in Python to have  a simple HTTP server started in opt-viewer.</div><div class=""><br class=""></div><div class="">On the other hand, I am not sure if we have precedence to ship tools written in Python in LLVM so we may *have to* move. </div><div class=""><br class=""></div><div class="">Adam</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Nov 11, 2016, at 11:50 PM, Bob Haarman <<a href="mailto:llvm@inglorion.net" class="">llvm@inglorion.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta content="text/html;charset=UTF-8" http-equiv="Content-Type" class=""><div class=""><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;" class=""><div class="">Hi Adam,<br class=""></div><div class=""><br class=""></div><div class="">Thank you for writing opt-viewer! I've been playing around with it and found it helps me understand what optimizations were performed, which were missed, and why, as well as easily navigate to the relevant code. Wanting to use it on larger projects, I found that it can take a while to analyze the optimization reports. Since there doesn't seem to be too much code in it yet, I figured it wouldn't be too much work to implement the same functionality in C++, which should give us a nice speedup compared to the current Python implementation. I have something that implements most of the functionality: the index page is generated and links to lines on source pages, which are also generated, but I haven't gotten to annotations on source pages yet. I expect to put up some code for review next week, but wanted to post here in case others are thinking along similar lines so we can hopefully avoid duplicating effort.<br class=""></div><div class=""><br class="">Cheers,</div><div class=""><br class=""></div><div class="">Bob<br class=""></div><div class=""><br class=""></div></div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></body></html>