Skip to content

Evaluate the performance of FFI #17

Description

@jonnylin13

It might make sense to pull some of the code out of Node.js and into a faster language like Rust, especially for the compute-heavy calls like AES encryption and WZ parsing (texture decompression). We need to evaluate the performance of the current implementation against a Rust implementation.

  • Implement Maple Shanda and AES in Rust
  • Add node bindings
  • Create a macro benchmark and run both of them with the same inputs (one in Node.js, one in Rust with FFI)
  • Report the results
  • Do the same for DXT decompression

If the overhead of FFI + running Rust code is far less costly than doing everything in Node.js, we should switch to this method.

Keep in mind this is probably only useful with DXT, because the native crypto module is probably already pretty fast. And it might also be worth it to just install node-dxt, or create another binding for libsquish if I can't get that to work

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is neededquestionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions