-
-
Notifications
You must be signed in to change notification settings - Fork 845
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
Use swf Tag parsing in core #3174
base: master
Are you sure you want to change the base?
Conversation
37d9abf
to
deb87d5
Compare
Thanks for your work! Pinging @adrian17 since he's profiled most of the code quite heavily and can weigh in. Ruffle used to use Specifically, for speed, the ideal code would compile down to code equal to the SWF/AVM parsing being all inline:
With reading a I guess for
This is much more important in the AVM, where we may parse thousands of ops per frame. For example, we should definitely not collect into a vec in Ruffle for Basically, I'm wary of relying too much on the compiler optimizing everything. Doing the above in a way that a) avoids copying and allocs, b) keeps the parsing code in (There are some other things in here that could be good as their own PRs, like keeping the list of actions for Call. Thank you!) |
I think my overall plan was to move the parsing in Later, we would move the entire preload code into In the meantime, we would improve the I agree with other points on Discord:
|
I noticed that a few parts in
core
was accessingswf::TagCode
andswf::Reader
methods directly, and doing a lot of the parsing thatswf
already does.This means that
core
andswf
are very tightly coupled, and makes it hard to changeswf
to be more streaming (see e.g. #74), since a lot of internal details are "leaked".Would like feedback whether I should continue this work?