Skip to content

Speed improvements#7

Open
mcconkeyp wants to merge 1 commit intoioppermann:masterfrom
mcconkeyp:master
Open

Speed improvements#7
mcconkeyp wants to merge 1 commit intoioppermann:masterfrom
mcconkeyp:master

Conversation

@mcconkeyp
Copy link
Copy Markdown

I use Yamdi in a TV archive application used by Universities (www.bobnational.com) and recently updated to 1.9 to fix a long-file duration tag problem. While doing this I noticed that Yamdi traverses the original FLV several times so I have refactored to reduce this to a single traversal for the tags and another for the data. On 2 GB FLVs it was taking about 90 seconds and now it takes about 30.

In case you are interested, I have committed my changes here. The main changes are:

  • Quite a lot of formatting changes as I used AStyle to reformat to style I'm used to and then again to try and revert back to your style.
  • Replace tag array with a linked list that is created during the first FLV file traversal.
  • Read audio and video flags during the first traversal so that analysis only needs to read a single video data block.
  • Some functions are refactored to remove goto/continue and multiple exit points as this is a style I am used to.

Happy to discuss,

Paul.

Refactor so that original tags are read to a linked list in a single
pass through the FLV. Audio and video flag bytes are also read during
this pass so that analysis does not require another pass. Speed improved
at least 3x on large files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant