Performance issues with using automatic url detection
eliassjogreen opened this issue · 0 comments
eliassjogreen commented
When running the tests using the options
const options: Plug.Options = {
name: "test_plugin",
url: path,
cache: resolveTest("cache"),
};
instead of
const options: Plug.Options = {
name: "test_plugin",
urls: {
darwin: `${path}/libtest_plugin.dylib`,
windows: `${path}/test_plugin.dll`,
linux: `${path}/libtest_plugin.so`,
},
cache: resolveTest("cache"),
};
the results differ with around a second in delay per test. Using automatic url detection:
running 3 tests
test remote | prepare ... Check file:///F:/code/denosaurs/plug/test/remote.ts
/test_plugin/target/debug/test_plugin.dll
Hello from plugin.
zero_copy[0]: test
zero_copy[1]: test
Hello from plugin.
zero_copy[0]: test
zero_copy[1]: test
ok (2317ms)
test local | prepare | relative ... Check file:///F:/code/denosaurs/plug/test/local.ts
Hello from plugin.
zero_copy[0]: test
zero_copy[1]: test
Hello from plugin.
zero_copy[0]: test
zero_copy[1]: test
ok (2136ms)
test local | prepare | absolute ... Check file:///F:/code/denosaurs/plug/test/abs.ts
Hello from plugin.
zero_copy[0]: test
zero_copy[1]: test
Hello from plugin.
zero_copy[0]: test
zero_copy[1]: test
ok (2084ms)
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (6537ms)
normal:
running 3 tests
test remote | prepare ... Check file:///F:/code/denosaurs/plug/test/remote.ts
/test_plugin/target/debug/test_plugin.dll
Hello from plugin.
zero_copy[0]: test
zero_copy[1]: test
Hello from plugin.
zero_copy[0]: test
zero_copy[1]: test
ok (1192ms)
test local | prepare | relative ... Check file:///F:/code/denosaurs/plug/test/local.ts
Hello from plugin.
zero_copy[0]: test
zero_copy[1]: test
Hello from plugin.
zero_copy[0]: test
zero_copy[1]: test
ok (1001ms)
test local | prepare | absolute ... Check file:///F:/code/denosaurs/plug/test/abs.ts
Hello from plugin.
zero_copy[0]: test
zero_copy[1]: test
Hello from plugin.
zero_copy[0]: test
zero_copy[1]: test
ok (969ms)
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out (3165ms)