Skip to content
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

TypeScript Performance #1591

Closed
caseyWebb opened this issue Jul 6, 2017 · 3 comments
Closed

TypeScript Performance #1591

caseyWebb opened this issue Jul 6, 2017 · 3 comments
Labels
AREA: server !IMPORTANT! STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@caseyWebb
Copy link
Contributor

caseyWebb commented Jul 6, 2017

Are you requesting a feature or reporting a bug?

Bug / Perf Issue

What is the current behavior?

Using the OOTB TypeScript support causes significant performance overhead.

The following are results from precompiling w/ tsc and running testcafe on the output vs. running testcafe on TypeScript files directly:

> npm run benchmark

> testcafe-slow-modules-example@ benchmark /Users/caseywebb/Code/testcafe-example
> echo TestCafé Version: $(testcafe --version) && npm run benchmark:prebuild && npm run benchmark:native

TestCafé Version: 0.16.2

> testcafe-slow-modules-example@ benchmark:prebuild /Users/caseywebb/Code/testcafe-example
> time sh -c 'tsc && testcafe chrome fixture/dist/index.js' > /dev/null


real    0m7.073s
user    0m3.328s
sys     0m0.370s

> testcafe-slow-modules-example@ benchmark:native /Users/caseywebb/Code/testcafe-example
> time testcafe chrome fixture/src/index.ts > /dev/null


real    0m20.673s
user    0m16.759s
sys     0m0.997s

What is the expected behavior?

Compilation should be comparable with precompiling tests with tsc

How would you reproduce the current behavior (if this is a bug)?

funny you should ask

System Details

  • operating system: macOS 10.12 and Windows 10
  • testcafe version: 0.16.2
  • node.js version: 8.1.3
@AndreyBelym
Copy link
Contributor

AndreyBelym commented Jul 7, 2017

Hello @caseyWebb, thank you for benchmarking 😄 I'm investigating the problem now, and I'll post any updates that I will have.

@AlexanderMoskovkin AlexanderMoskovkin added TYPE: bug The described behavior is considered as wrong (bug). AREA: server labels Jul 10, 2017
@AlexanderMoskovkin AlexanderMoskovkin added this to the Sprint #8 milestone Jul 10, 2017
AndreyBelym added a commit to AndreyBelym/testcafe that referenced this issue Jul 14, 2017
@caseyWebb
Copy link
Contributor Author

I didn't see that you'd made a commit in your fork and got to playing with this. I took a different route, so not sure you'll want it.

https://github.com/caseyWebb/testcafe/commit/83c720f7f3cbe23deed1dfa5490ca291e084117f

yarn benchmark v0.27.5
$ echo TestCafé Version: $(testcafe --version) && npm run benchmark:prebuild && npm run benchmark:native
TestCafé Version: 0.17.0-alpha2

> testcafe-slow-modules-example@ benchmark:prebuild /Users/caseywebb/Code/testcafe-example
> time sh -c 'tsc && testcafe chrome fixture/dist/index.js' > /dev/null


real    0m9.001s
user    0m5.503s
sys     0m0.483s

> testcafe-slow-modules-example@ benchmark:native /Users/caseywebb/Code/testcafe-example
> time testcafe chrome fixture/src/index.ts > /dev/null


real    0m7.214s
user    0m3.473s
sys     0m0.334s

I tried running the benchmarks on your branch but got the following error:

ERROR Cannot prepare tests due to an error.

TypeError: Cannot read property 'length' of undefined

Type "testcafe -h" for help.

@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
…xpress#1616)

* Fix TypeScript compilation performance (closes DevExpress#1591)

* Fix lint

* Fix tests

* Update comment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AREA: server !IMPORTANT! STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

3 participants