Performance of fsfile.tests
See original GitHub issueIn fsfile tests.
Every test takes at least 1000ms
ts.CreateProgram took almost time(about 1000 ms)
let options = jsOptions<Ts.CompilerOptions>(fun o ->
o.target <- Some ScriptTarget.ES2015
o.``module`` <- Some ModuleKind.CommonJS
)
let setParentNodes = true
let host = ts.createCompilerHost(options, setParentNodes)
ts.createProgram(ResizeArray tsPaths, options, host)
After published ts2fable online version, I found we can create a single ts program with almost empty host for simple generation (100ms)
let host = jsOptions<CompilerHost>(fun o ->
o.getSourceFile <- fun fileName -> if fileName.StartsWith "module" then Some sourceFile else None
o.writeFile <- fun (_,_) -> ()
o.getDefaultLibFileName <- fun _ -> "lib.d.ts"
o.useCaseSensitiveFileNames <- fun _ -> false
o.getCanonicalFileName <- id
o.getCurrentDirectory <- fun _ -> ""
o.getNewLine <- fun _ -> "\r\n"
o.fileExists <- fun fileName -> inputFileName = fileName
o.readFile <- fun _ -> Some ""
o.directoryExists <- fun _ -> true
o.getDirectories <- fun _ -> ResizeArray []
)
let program = ts.createProgram(ResizeArray [inputFileName], options, host)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Exploring "io/fs" to Improve Test Performance and Testability
In this article I will present the tests in the form of a benchmark. This will allow us to compare the performance of...
Read more >Is there a tool for testing the performance of reading ...
This "microbenchmark" approach allows testing single functions with multiple threads/iterations/input data and reports the trends.
Read more >How do ulimit -n and /proc/sys/fs/file-max differ?
The ulimit is enforced on a process level, which can be less than the file-max . There is no performance impact risk by...
Read more >WinFsp Performance Testing
This document presents results from performance testing of WinFsp. ... The "File Tests" chart summarizes performance of file path namespace ...
Read more >Low Level Performance Testing for Object Storage
While the ultimate goal of our performance testing is to verify object storage performance for GET and PUT operations, we always start by ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Currently ts2fable online is manually published.