Ben Lesh is a Software Engineer at Google and is the author and project lead for RxJS 5+. He provides us with an update on the current state of RxJS. Currently, the size of RxJS (minified, bundled, and gzipped is 33k. However, Ben has created a library that shrunk the size of RxJS to only 3k!
To do this, he moved all the error handling into one central spot so v8 can inline all the other functions without having to deal with the de-optimized functions that you get if you have a tryCatch block in a function.
There were some compromises that Ben had to make in order to get it to a smaller size, but the new improvements to the library should be roughly the same speed and about 10x smaller.
Though RxJS does not currently take advantage of Angular’s compiler, an ideal scenario would be to get Angular’s template compiler and use it at build-time to produce functions able to handle updates in the DOM based on the compiled template.
Many who use RxJS wonder about RxJS’s testing story. RxJS has a great testing suite that runs a battery of more than 2,500 tests within a second. Unfortunately it does not provide much utility to the average user yet. The test suite currently schedules synchronistic tests on things that would normally run asynchronistically but does it in a determinate way. It makes some assumptions based off the fact that it is only really used in RxJS’s core library, but there is work being done to make this more useful externally. A lot of challenging problems remain to be resolved before it is successful.
New updates on the testing story include a prototyping of a testing suite in T-Rx. Ben tells us he was able to re-write the schedulers meaning that he had access to a brand new virtual scheduler that he wrapped in a high order function that gives users access to everything you might need for testing. This automatically sets up the other schedulers so they work in an expected way with the test scheduler.
There is more to come, so keep up to date with RxJS on the latest developments on the project in Github.
If you are interested in contributing to RxJs or T-Rx you can reach out to Ben on Twitter or github. @benlesh.
For more JavaScript focused news & events, visit http://thisdot.co.
Sponsored by This Dot Labs, a framework agnostic mentoring co built by core OSS contributors. http://thisdot.co/labs
To do this, he moved all the error handling into one central spot so v8 can inline all the other functions without having to deal with the de-optimized functions that you get if you have a tryCatch block in a function.
There were some compromises that Ben had to make in order to get it to a smaller size, but the new improvements to the library should be roughly the same speed and about 10x smaller.
Though RxJS does not currently take advantage of Angular’s compiler, an ideal scenario would be to get Angular’s template compiler and use it at build-time to produce functions able to handle updates in the DOM based on the compiled template.
Many who use RxJS wonder about RxJS’s testing story. RxJS has a great testing suite that runs a battery of more than 2,500 tests within a second. Unfortunately it does not provide much utility to the average user yet. The test suite currently schedules synchronistic tests on things that would normally run asynchronistically but does it in a determinate way. It makes some assumptions based off the fact that it is only really used in RxJS’s core library, but there is work being done to make this more useful externally. A lot of challenging problems remain to be resolved before it is successful.
New updates on the testing story include a prototyping of a testing suite in T-Rx. Ben tells us he was able to re-write the schedulers meaning that he had access to a brand new virtual scheduler that he wrapped in a high order function that gives users access to everything you might need for testing. This automatically sets up the other schedulers so they work in an expected way with the test scheduler.
There is more to come, so keep up to date with RxJS on the latest developments on the project in Github.
If you are interested in contributing to RxJs or T-Rx you can reach out to Ben on Twitter or github. @benlesh.
For more JavaScript focused news & events, visit http://thisdot.co.
Sponsored by This Dot Labs, a framework agnostic mentoring co built by core OSS contributors. http://thisdot.co/labs
RxJS 6 and 7, Testing, and More in an Interview with Ben Lesh, Author and Project Lead of RxJS 5+ front end languages | |
12 Likes | 12 Dislikes |
1,093 views views | 5.39K followers |
Science & Technology | Upload TimePublished on 25 Aug 2017 |
Không có nhận xét nào:
Đăng nhận xét