Most chapters of this documentation is outdated temporarily now, the arch of elvisjs has just changed these days. The new documentation is coming, welcome to join and work with us together!

Benchmark

A counter App is the target where elvis tests runs.

/* PATH='counter/pages/index.js' */
import { Center, Text, StatefulWidget } from "calling-elvis";

class Counter extends StatefulWidget {
  state = {
    hello: "Is anybody home?"
  }

  create() {
    let start = new Date().getTime();
    for (let i = 0; i < 100000000; i++) {
      this.state.hello = i.toString();
    }
    let end = new Date().getTime();
    console.log((end - start) + "ms");
  }

  render() {
    return Center(
      Text(this.state.hello, {
        bold: true,
        italic: true,
        size: 6,
      })
    );
  }

  update() {
    console.log("update...");
  }

  dispose() {
    console.log("dispose...");
  }
}

export default Counter;
# PATH='counter/'
yarn dev
ModelProcessorMemory
mbp.Catalina.17.13-inch2.3 GHz Dual-Core Intel Core i516 GB 2133 MHz LPDDR3

DOM Update

library10,000100,0001,000,00010,000,000100,000,000
elvis~1ms~10ms~100ms~900ms~8s
react~35ms~125ms~830ms~8000msbroken
vue~7ms~40ms~280ms~3000ms~26s

Bundle Size

librarysize
elvis432kb
react484kb
vue592kb