Paperback-iOS / paperback-toolchain

Paperback Types and Build Tools in a single repository.
7 stars 5 forks source link

Watch mode, OS compatibility and Rustifying code #4

Closed Ivanmatthew closed 4 months ago

Ivanmatthew commented 11 months ago

In this pull request, you can find that I:

In the future, it might be lucrative to invest in porting the toolchain fully to rust.

Ivanmatthew commented 11 months ago

The in-house time measurer is used for this measurement:

Difference in execution time

Using the command 3 times on both non-rust (--use-node-fs=true) and with rust implementation, the following is resulted; Attempt 1:

Version Execution Time
Without Rust 21902 ms
With Rust 6486 ms

Attempt 2:

Version Execution Time
Without Rust 21589 ms
With Rust 6835 ms

Attempt 3:

Version Execution Time
Without Rust 22550 ms
With Rust 7731 ms
Ivanmatthew commented 11 months ago

The current identified bottleneck (or else called slowing down of bundling, is browserify. The browserify promises take the longest to process and also mess with the time measuring. Supposedly this is because the promises are halted and then resumed at the next event frame.

Personally I think it might be because of the fswritestream, an alternative might be to use the browserify rust (rustify) module.

Ivanmatthew commented 4 months ago

Continued in PR #7