Tuesday, April 1, 2008

Demo 2 and PW Extension v0.9 + screenshots

So in my previous demo (demo #2) I showed Dave what was then the initial concept for the plugin activity meter. Since then I had fixed some bugs and removed a substantial amount of code.

I have decided to remove the plugin recorder feature from the extension as it would not be of much use to most end users. Instead I'm considering making the recorder into its own extension, in case anyone would find that sort of thing useful. The recorder is in fact its own class, and should be easy enough to transplant into an existing extension skeleton; for now however, there are more immediate issues I must tend to, so this will be on the back burner for now.

A lot of the missing code can also be attributed to the old method by which PW made the decision to notify the user of a high runtime. The new method is much more compact - considering it consists only of about 45 lines of code vs. the old method totaling almost 120 lines. The major difference between the two methods is in the usefulness of the information each provides. The old method sampled the runtime values over a given period of time. If a runtime of 'x' or more was reported 'y' or more number of times, the system would notify the user that the plugin might be consuming too many resources. The current method by contrast samples the runtime values within a given period of time, totaling them and then calculating this as a percentage of total time (the sampling time). The new method makes away with most all of the somewhat clunky settings in the previous extension and it also allows for a far more informative graphical representation of the load compared to that of the old method.

So now for some screen shots of the new graphical components:

First what it looks like in its inactive state.


Active, with a plugin running.



Various flash content.







Youtube video playing.



Flash video loading.



Flash based game.



Can't forget the new and compact settings dialogue.



Now that the extension is taking shape for the 1.0 release and the core patch is inching closer to the tree, I'm going to concentrate on getting the performance testing under way. In the meantime feel free to try out the extension for yourself. The details are on the project wiki page: click here.

Thursday, March 20, 2008

First demo, new Plugin Recorder features and a new core patch

First Demo:


So I had my first demo yesterday, which turned out pretty well I think. Looking back, it does feel like I have come a long way, and doing the demo helped cement that thought; which strangely motivated me to start working on some of PW's more exotic frontiers - namely lack of OSX support and the somewhat shifty Unix compatibility. To that end I started debugging late last night (or early this morning) and managed to find where all that plugin fun happens. Also I owe Mike Shaver (shaver on IRC) a big thank you for helping me make sense of that hairy code. Now I feel closer than ever to being able to implement PW on all platforms uniformly.



Plugin Recorder v0.2:


There have also been some developments in the new Plugin Recorder feature of PW - I have implemented a new option that allows the user to control how the data gets written to the file. Admittedly however, this feature would not be of great use to the large majority of people who might otherwise have interest in using PW's notifications feature. Because of this I will be shifting most of my attention to creating some type of a graphical notification feature using some sort of an existing graphical library. If you happen to know of a good one that would fit this task, don't hesitate to tell me by leaving a comment!

For those of you interested in seeing, I have created a screen capture video of a flash plugin and its run time being charted in real time using LiveGraph. I am working on compositing the two videos together and will post a link here to the uploaded video when its done.



New Core Patch:


In my second review from Robert (roc on IRC), I was instructed to switch some of my code from a MACRO into a helper function. This new PW v0.81 core patch addresses this issue by introducing a new file to the mix - dubbed nsNotifyPluginCall.cpp. This was a slightly more challenging implementation compared with the MACRO solution I came up with initially, but it was a great learning experience - teaching me how to include new files in a patch and enriching my knowledge of the build system in general. I have not yet received any feedback for this patch, but I'm fairly confident Robert would be satisfied with the changes, as they do seem to address most all of the points raised in both his reviews (Update: new review has been posted by Robert, currently working on updating my code). The only point this patch fails to address is the performance testing which still needs to get done. After talking to Dave (humph) and Chris (ctyler) I think I have a more concrete plan as to how to go about this testing. The first thing I would need is to locate (or more likely create) a page that contains a loop with JS calls into a flash object. Once I have that I would need to create a script that opens Firefox, launches the plugin page and closes the browser when the loop is done. Calling this script with the "time" command, both when PW is present and when it is not, should give me an indication if my code affects performance in any significant way.

Monday, March 17, 2008

New patch and new extension feature to assist with benchmarking

So for this 0.8 release I had done two things.

The first thing I did was some major surgery on the C++ code me and Brandon wrote at the end of last semester in OSD600. That code has not changed much since then and although these new changes are still largely cosmetic by nature, I do hope they bring me closer to the final product and ultimately to having the code integrated into FF.

The second thing I had done was add a new feature to the PW extension. This new feature allows you to record a plugin's run time to a file. If I'm correct, this should make benchmark testing of various plugins much easier. I still have to add some functionality for this feature as it is pretty basic right now but I was still able to hook it up with liveGraph (open source real time charting software) to produce a real time graphical representation of the plugin's run time. I'm planning on posting a video depicting this, as soon as I find a good screen video capture software. For now you will have to enjoy this lovely screen shot:

In case you are wondering, this depicts an interactive flash object running for approximately 8 minutes.

If you would like to try the new extension you must also use the new 0.8 patch, otherwise this will not work. You can download the necessary files and read the installation instructions on my wiki page.

As always, your feedback is appreciated, and if you have a plugin that you would like tested leave a comment with the plugin's name and a URL to a page containing it.

Tuesday, March 4, 2008

0.7 is Out

So for the 0.7 release I decided to concentrate on making the newly created extension useful and usable. I fixed some bugs and added some options to allow the user to control what should constitute a high run time they would like to be notified of. Also in the option dialogue you can now view the actual run time in real time which would be helpful to anyone installing the extension on a non debug build.

Here is a summary for all the new changes and additions:

  • Fixed notification bar bug where the user notifications would collect one on top of the other. The notification will now only appear if no other PW notifications are present.
  • Added option to turn PW on and off in the context and Tools menu.
  • Added a preference panel to the extension where a user can control various settings of PW.
    • Users may turn PW on and off.
    • Users may change the monitoring settings of PW to notify them when a certain run time has occurred, a certain number of times, within a certain period of time.
    • Users may view the current run time directly in the preference panel.
For instructions on how to install the new extension please refer to the project wiki page.

Monday, February 18, 2008

PW extension release

Back in mid December, when me and Brandon were closing in on our final submission of Plugin Watcher (0.31), we had to go against Mark Finkle's advice and hack our JS code directly into 'browser.js'. Mark had told us how inelegant this solution was, and this is the reason that my 0.6 release is the Plugin Watcher Extension. This extension listens to the runtime notifications of your plugins and notifies you if they exceed a certain limit a certain number of times per certain amount of time. At the moment the extension does not add any new functionality, but I'm working on including various configuration options in the future. To try the extension out click here to get to the project wiki.

Thursday, January 17, 2008

Releasing PW 0.4

Not too much thats exciting in this release but I did just file a bug with the PW 0.31 patch. I'm hoping this will start the ball rolling towards v1.0 and provide me with lots of new ideas and suggestions. Click here if you would like to see the bug and please don't hesitate to leave a comment or two of your own if you have any remarks, suggestions or any criticism at all - all of your feedback is valuable and highly appreciated!

Monday, January 14, 2008

Rebuilding firefox and starting OSD700

So this has been a hectic first week of school but things finally seem to be calming down a little. I thought I would take this time to (a) let you know what I have been up to and (b) describe what I hope to achieve in the next 4 months in OSD700.

So regarding part a - I decided to rebuild minefield last night on my home desktop. I did this partially because I still have not been able to checkout an XPS laptop from ORI but perhaps primarily because I had recently upgraded my computer from 1GB to 3GB of ram and was curious to see how that might affect the build time. As some of you may recall, when I first tried building the source tree on this machine it took no less than 10 hours, so I was rather curious to see how much shorter the process will be with the new hardware. Unfortunately however, I got an error during compilation and therefore I can't report on any improvements for now. I will be trying again shortly though and will post here if you are curious.

And as far as part b goes - I have given it some thought and came up with the following list of things I would like to achieve for my 1.0 release:
  • File a bug with my 0.3 patch and get some feedback for the code.
  • Work on the code in accordance with the feedback I receive.
  • Get the code to work on macs.
  • Get the JS portion out of the browser and into a proper extension.
  • Improve the heuristics of the front end extension.
I have also thought of some other things that I could do - outlined below - but whether these goals can actually fit into the schedule remains to be seen (I assume this would largely be dictated by what sort of feedback I receive for the code on Bugzilla):
  • Provide more information about the plugin that is causing the issue.
  • Provide a way to disable the plugin.
  • Add code to the front end JS that will collect and display statistical information about plugin runtime.
  • Do plugin benchmarking and publish the results.
As always your comments are welcome!