timdream / jszhuyin

JS 注音:JavaScript 自動選字注音輸入法;"Smart" Chinese Zhuyin Input Method in JavaScript.
https://jszhuyin.timdream.org/
MIT License
225 stars 19 forks source link

Performance tests #6

Closed timdream closed 7 years ago

timdream commented 11 years ago

lots of rooms of improvement possible

timdream commented 9 years ago

OK. Let's do this:

Create a grunt task that could run a performance test against a built database. For the test

  1. Get the JSZhuyin running on node.
  2. Prepare a set of symbol and character input, and feed it into the instance.
  3. Measure the time it takes to complete.
  4. Report N times it takes to complete & print it out with Node version etc.

In essence, the test is a lengthy version of the existing interactive/integration test.

timdream commented 9 years ago

PS Obviously the above plan only tests performance on V8. If we want to test performance on Gecko JS Engine (not sure about the current monkey name...), we should set up the same test case in a Firefox worker scope.

The point here is not to pollute the numbers with DOM performances, which can be vary greatly between browser versions and even on different graphic cards.

timdream commented 8 years ago

Here is what we should do to run the test in a browser, to get access other than V8.

The purpose of the test is to find performance bottlenecks, which running in a worker will give up enough clarity (and, with help like profilers in development tools). Unfortunately Gecko DevTools has no worker access yet though.

timdream commented 7 years ago

Fixed in 9f39f3593a09a101774e24fe26e75360140ce773.