-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(v8/scripting): swap from msgpack-lite to msgpackr #3201
base: master
Are you sure you want to change the base?
Conversation
a8209c3
to
9e2752b
Compare
Might be worth only disabling |
Perhaps in a separate PR which can enable moreTypes and also add some extensions that are "breaking" (e.g. vectors to array or a builtin vector class) - rather than moving the goalpost here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few things to improve:
- Add licenses, links to original and authors mentions to the files containing third-party code (as it was with msgpack-lite).
- Document any changes made to the third-party code so that when such code would need to get changes from the upstream - we'd know what changes to re-apply.
Nits:
main.js
is not the most well "styled" code for sure, but it'd be great not to worsen it and keep using trailing semicolons and commas along with proper indentation for our code (third-party excluded, of course).
9e2752b
to
b6158e4
Compare
b6158e4
to
486468a
Compare
Licenses and links added to the built files, including a link to my fork of msgpackr so you can see the commit. I made sure to comment out the original code and include a note about msgpack-lite above the modified code; but it's fairly minimal. Some parts might not even be strictly necessary - but better safe than sorry. I'm using the msgpackr global that's already exposed by the library, which is now removed to prevent any funny business. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff!
486468a
to
3d8e8c9
Compare
The original reason |
Co-authored-by: Dillon Skaggs <[email protected]>
3d8e8c9
to
bfdf543
Compare
Goal of this PR
Swaps out the outdated and unsupported msgpack-lite package for msgpackr, improving performance (58-95% faster depending on data and size) and adding support for more features (some are disabled for compatibility purposes).
How is this PR achieving the goal
Swaps out the custom version of msgpack-lite with msgpackr, adds bufferish to maintain backwards-compatibility for unknown types, and uses some patches to behave more like msgpack-lite.
This PR applies to the following area(s)
ScRT: JS
Successfully tested on
Game builds: FXServer 13019, FiveM 3258, RedM 1491
Platforms: Windows
Checklist
Fixes issues
Supersedes #2931 and #3018.