flagbug/YoutubeExtractor — pull request #75 by Cyano (2014-08-11 12:48:10+00:00)
Title: Improved the performance in the Decipher

I've removed a lot of unnecessary code duplication in Decipher.cs, changed to regex to get the function name.
A loop breakout has been added when determining the function names of the operations, this will mean once all three functions have been determined then the code can breakout (less wasted cycles)

The major change of this commit is rearrangement of how the decipher works. Previously it used to get the values for the cipher operations every time a download or URL is required decrypting. This is unnecessary because the operations will be the same in each different version of the html5player. So now, it will determine the operations of the cipher once (DecipherOperations) and store it in a variable. Each time a signature is required to be deciphered, the stored operations value will be used to determined the deciphered version.
This should improve the performance of deciphering video signatures.

I've tested out and it seems to work fine. If anyone else gets a chance to test this,
Let me know how it works out or if you have any comments.