Videos
After I created the new library section which allows voting and comments I now have some very useful pieces to build upon. So this weekend I created a new videos section to complement the library. To start off with I created a video to demonstrate the process of writing a Strong Password Regular Expression. I decided to host the videos myself and use a Silverlight video player. The player I used is open-source and very slick. I made a few modifications to it for my own use. I primarily worked on the media controls auto-hiding behavior and I think I finally have it the way I want it.
Improved Responsiveness
While that would ordinarily be a productive weekend, I've been meaning to make a couple technical improvements to the tester for some time now. The first issue is a general slowness when you're dealing with a huge target string with real-time highlighting on. The trouble is that the application has to run the regular expression, calculate the positions to highlight, and update the GUI after every keypress. Ordinarily this would be very responsive. However, when the target string is over 100,000 characters long or so you might start to notice it slow down and even prevent you from typing as fast as you'd like. So I've added some multi-threading to the app utilizing a BackgroundWorker. I had to write this very carefully to get the most out of it, but I think it's working quite well. The benefit here is that the real-time highlighting won't slow your typing nearly as much as it did before.
Better Memory Efficiency
Lastly, I made yet another update to my undo/redo system. I've talked before about how I had to implement my own multiple undos/redos for Regex Hero because Silverlight didn't ship with that feature. Well, in order to improve efficiency I've made a small change to the way it works. It'll now add undo history on the KeyUp event. This means that if you hold down Enter, for example, to create a bunch of line breaks then the undo history will not record every line break individually. Instead, it'll only record the history after you release the key. This is hard to measure because it depends so much on your typing habits, but this should reduce memory consumption significantly.
After I created the new library section which allows voting and comments I now have some very useful pieces to build upon. So this weekend I created a new videos section to complement the library. To start off with I created a video to demonstrate the process of writing a Strong Password Regular Expression. I decided to host the videos myself and use a Silverlight video player. The player I used is open-source and very slick. I made a few modifications to it for my own use. I primarily worked on the media controls auto-hiding behavior and I think I finally have it the way I want it.
Improved Responsiveness
While that would ordinarily be a productive weekend, I've been meaning to make a couple technical improvements to the tester for some time now. The first issue is a general slowness when you're dealing with a huge target string with real-time highlighting on. The trouble is that the application has to run the regular expression, calculate the positions to highlight, and update the GUI after every keypress. Ordinarily this would be very responsive. However, when the target string is over 100,000 characters long or so you might start to notice it slow down and even prevent you from typing as fast as you'd like. So I've added some multi-threading to the app utilizing a BackgroundWorker. I had to write this very carefully to get the most out of it, but I think it's working quite well. The benefit here is that the real-time highlighting won't slow your typing nearly as much as it did before.
Better Memory Efficiency
Lastly, I made yet another update to my undo/redo system. I've talked before about how I had to implement my own multiple undos/redos for Regex Hero because Silverlight didn't ship with that feature. Well, in order to improve efficiency I've made a small change to the way it works. It'll now add undo history on the KeyUp event. This means that if you hold down Enter, for example, to create a bunch of line breaks then the undo history will not record every line break individually. Instead, it'll only record the history after you release the key. This is hard to measure because it depends so much on your typing habits, but this should reduce memory consumption significantly.
Comments
Post a Comment