-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance improvements #9
Conversation
… area every frame is slow.
- Avoid using slow callbacks - Copy and storing the rgba value as one 32bit value instead of four single bytes. - Store rgba data in one buffer and not objects
Can you try also the following?
Please bear with me since this is a quick glance into the code and I might be missing a seemingly obvious point. |
… subtitle stream while it's still downloading. All display sets in the completed download range can already be rendered and don't have to wait until the whole file is completed.
@ferferga Thank you very much for your suggestions. I appreciate your support, but please don't feel forced to work on this project. The latest commit allows the render to partial consume the pgs steam. It can render all completed subtitles downloaded to this point. Even if the subtitle file is large and takes some time, you will be able to see the early subtitles already. I guess this addresses the most critical issue.
Yes, that's a topic still on my list.
Moving image data between workers creates a large memory allocations. Not sure if these are worth the few milliseconds building the subtitle. This is properly addressed by preparing the image data for the next subtitles in advanced.
I added this. Couldn't measure any difference so far, but I'll keep it in.
A |
Some changes to improve rendering performance:
clearRect
. This really improves clear performance in Firefox.