Tools to help you improve performance of your Vue application.

Overview

Why did you update

Tools to help you improve performance of your Vue application.

Usage

If we want to know how many times that (one of or all of) watch or computed has been updated or how long does they take. We can use whyDidYouUpdate.

For example, We have a demo project. And the major component is:

<script setup lang="ts">
  import { watch, computed, ref } from "@vue/composition-api";

  const sleep = (n: number) => new Promise(resolve => setTimeout(resolve, n))

  const msg = ref(0);
  const plusOne = computed(() => {
    return msg.value + 1;
  });
  const plusTwo = ref(msg.value);
  watch(
    () => plusOne.value,
    (one) => {
      plusTwo.value = one + 1;
    }
  );
  const plusTwoAfterOneSecond = ref(msg.value);
  watch(
    () => plusOne.value,
    async (one) => {
      await sleep(1000)
      plusTwoAfterOneSecond.value = one + 1;
    }
  );
</script>
<template>
  <div class="hello">
    <p>value: {{ msg }}</p>
    <p>value plus one: {{ plusOne }}</p>
    <p>value plus two: {{ plusTwo }}</p>
    <p>value plus two after one second: {{ plusTwoAfterOneSecond }}</p>
    <button @click="msg++">Plus</button>
  </div>
</template>

If we click Start in devtools panel. And then click Plus button a few times. And then click End in devtools panel. We can see the result:

overview

In above table, you can see how many times watch or computed has been called and how long it has been running. We can use those information to find out which watch or computed has useless/repeated/unexpected calls and which watch or computed is the bottleneck of performance.

FPM

You can also use Reload and Start (in the dropdown) to monit your app when it first render.

Install

  1. yarn add babel-plugin-why-did-you-update.
  2. add why-did-you-update to your babel config file.
// babel.config.js
module.exports = {
  presets: ["@vue/cli-plugin-babel/preset"],
  plugins: ["why-did-you-update"],
};
  1. Install Chrome extension WhyDidYouUpdate
    1. For nightly version, youcan unzip extension and load it in Chrome.
      1. You can download nightly build of Chrome extension at CI artifacts.
  2. Build or serve your project.
  3. Open your project with Chrome.
  4. Open why did you update tab in Chrome devtools.
  5. Click Start
  6. Do something in your page.
  7. Click Stop.
  8. Here we go.
You might also like...

A devtool improve your pakage manager use experience no more care about what package manager is this repo use; one line, try all.

pi A devtool improve your pakage manager use experience no more care about what package manager is this repo use; one line, try all. Stargazers over t

Nov 1, 2022

Build Schema.org graphs for JavaScript Runtimes (Browser, Node, etc). Improve your sites SEO with quick and easy Rich Results.

schema-org-graph-js The quickest and easiest way to build Schema.org graphs for JavaScript Runtimes (Browser, Node, etc). Status: 🔨 In Development Pl

Dec 21, 2022

Improve the security of your API by detecting common vulnerabilities as defined by OWASP and enforced with Spectral.

Spectral OWASP API Security Scan an OpenAPI document to detect security issues. As OpenAPI is only describing the surface level of the API it cannot s

Dec 8, 2022

BCash is an app to help you keep track of who you owe and who owes you money in an easy way. Split your tabs and more.

BCash BCash is an app to help you keep track of who you owe and who owes you money in an easy way. Split your tabs and more. Routes for develpment: lo

Aug 11, 2022

The website which can help you to organize your daily or weekly activities and review them when you need them. you can add, remove and delete an activity

To Do list To do project is webpack project that list activities someone can do at a specific time In this TO-DO list, you can add or remove you activ

Jul 21, 2022

🎨ansi escape code generator to help make colorful command line tools

ansicodes 🎨 ansi escape code generator to help make colorful command line tools i got tired of looking up ansi code tables when writing command line

Dec 17, 2022

A comprehensive collection of useful tools developed with the help of Ethers.js to interact with the Ethereum Blockchain to develop great DeFi apps as quickly and easily as possible.

hudi-packages-ethersfactory How to install Installing with npm For more information on using npm check out the docs here. npm i @humandataincome/ether

Mar 30, 2022

A hub for web developers that offers a variety of tools to help with any developing needs.

A hub for web developers that offers a variety of tools to help with any developing needs.

WebDevHub - A place for developers WebDevHub is designed to be one central place for developers, that offers a variety of tools to help with any devel

Dec 11, 2022

A library for boolean aliases to help you make your code more confusing and make your coworkers hate you.

yup-nope A library for boolean aliases to help you make your code more confusing and make your coworkers hate you. Installation Using npm: npm install

Dec 10, 2022
Releases(0.0.1)
Owner
快手“探索组”前端
快手“探索组”前端
e-ONG, an authorial project, whose objective is to help ONGs to find people who need help or would like to help them

This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: npm start Runs the app in the developmen

Lucas Lima 2 Nov 11, 2022
Do you wanna improve your Twitch chat interactivity? Hold my beer.

OpenTwitch ???? O que é a OpenTwitch? A OpenTwitch é uma aplicação NodeJS desenvolvida ao vivo na twitch com o objetivo principal de fazer uma solução

Jhonatan Junio 40 Dec 28, 2022
A small application to improve worklow of SkyTemple users.

SkyTemple Helper A small application to improve workflow of SkyTemple users. You can tell because the icon is brelpog. Some applications will require

null 3 Oct 4, 2022
HackMIT 2022. 2nd Place in Blockchain for Society sponsored by Jump Crypto. A revolutionary web application that leverages machine learning and blockchain technology to improve the crowdsourcing experience!

?? Wikisafe ?? Wikisafe is a revolutionary new crowdsourcing web application that innovates the process of crowdsourcing information. This application

Benson Liu 5 Dec 8, 2022
Webpack dev tools to make performance analysis, error investigation and loader development more convenient

build-tool-inspector Introduction Webpack dev tools to make performance analysis, error investigation and loader development more convenient. Provide

Modern JS 25 Nov 17, 2022
A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snippets.

Warm Up ?? ??‍?? A VS Code extension to practice and improve your typing speed right inside your code editor. Practice with simple words or code snipp

Arhun Saday 34 Dec 12, 2022
A web app which help you to save you a list of your favorite books, they will be saved on your local storage to never loose them even if you close the page. Built wiht JavaScript

Awesome Books In this project I build a page to save a list of your favorites books, you can add new books, delete it and they will be saved in the lo

Williams Colmenares 9 Dec 17, 2022
Open Source projects are a project to improve your JavaScript knowledge with JavaScript documentation, design patterns, books, playlists.

It is a project I am trying to list the repos that have received thousands of stars on Github and deemed useful by the JavaScript community. It's a gi

Cihat Salik 22 Aug 14, 2022
This Plugin adds shortcodes with various prewritten phrases to improve quality and productivity of your writing.

Obsidian Phrasebank This Plugin adds shortcodes with various prewritten phrases to improve quality and productivity of your writing. Example :intro_pr

Viktor Bezdek 9 Jan 1, 2023
✨ An Eslint config to improve your code

eslint-config-descartes ✨ An Eslint config to improve your code by Descartes Team How to use? 1 - Install Eslint npm instal eslint-config-descartes es

Descartes 4 Dec 21, 2022