app/vmui: increase perceived performance by 2.5x by reducing the delay before the query execution from 0.8s to 0.3s

The delay cannot be removed, since it is used for limiting the rate of queries sent to VictoriaMetrics during graph scrolling.
This commit is contained in:
Aliaksandr Valialkin 2023-01-18 01:32:37 -08:00
parent c5e858461c
commit 46645f5d94
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1
5 changed files with 6 additions and 6 deletions

View file

@ -1,12 +1,12 @@
{ {
"files": { "files": {
"main.css": "./static/css/main.e8e53cbf.css", "main.css": "./static/css/main.e8e53cbf.css",
"main.js": "./static/js/main.b53fb552.js", "main.js": "./static/js/main.58fe7908.js",
"static/js/27.c1ccfd29.chunk.js": "./static/js/27.c1ccfd29.chunk.js", "static/js/27.c1ccfd29.chunk.js": "./static/js/27.c1ccfd29.chunk.js",
"index.html": "./index.html" "index.html": "./index.html"
}, },
"entrypoints": [ "entrypoints": [
"static/css/main.e8e53cbf.css", "static/css/main.e8e53cbf.css",
"static/js/main.b53fb552.js" "static/js/main.58fe7908.js"
] ]
} }

View file

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="VM-UI is a metric explorer for Victoria Metrics"/><link rel="apple-touch-icon" href="./apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png"><link rel="manifest" href="./manifest.json"/><title>VM UI</title><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono&family=Lato:wght@300;400;700&display=swap" rel="stylesheet"><script src="./dashboards/index.js" type="module"></script><script defer="defer" src="./static/js/main.b53fb552.js"></script><link href="./static/css/main.e8e53cbf.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html> <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="VM-UI is a metric explorer for Victoria Metrics"/><link rel="apple-touch-icon" href="./apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png"><link rel="manifest" href="./manifest.json"/><title>VM UI</title><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono&family=Lato:wght@300;400;700&display=swap" rel="stylesheet"><script src="./dashboards/index.js" type="module"></script><script defer="defer" src="./static/js/main.58fe7908.js"></script><link href="./static/css/main.e8e53cbf.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

View file

@ -133,7 +133,7 @@ export const useFetchQuery = ({
setIsLoading(false); setIsLoading(false);
}; };
const throttledFetchData = useCallback(debounce(fetchData, 800), []); const throttledFetchData = useCallback(debounce(fetchData, 300), []);
const fetchUrl = useMemo(() => { const fetchUrl = useMemo(() => {
const expr = predefinedQuery ?? query; const expr = predefinedQuery ?? query;