perf: reduce various timeout and retry intervals for improved responsiveness to fetch proxy infomation (#6072)

This commit is contained in:
Tunglies
2026-01-25 15:31:34 +08:00
committed by GitHub
parent 6ded9bdcde
commit 6477dd61c3
3 changed files with 10 additions and 5 deletions

View File

@@ -27,8 +27,13 @@ import {
useTheme,
} from "@mui/material";
import { useLockFn } from "ahooks";
import React from "react";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import React, {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from "react";
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router";
import { delayGroup, healthcheckProxyProvider } from "tauri-plugin-mihomo-api";
@@ -46,8 +51,8 @@ const STORAGE_KEY_GROUP = "clash-verge-selected-proxy-group";
const STORAGE_KEY_PROXY = "clash-verge-selected-proxy";
const STORAGE_KEY_SORT_TYPE = "clash-verge-proxy-sort-type";
const AUTO_CHECK_INITIAL_DELAY_MS = 1500;
const AUTO_CHECK_DEFAULT_INTERVAL_MINUTES = 5;
const AUTO_CHECK_INITIAL_DELAY_MS = 100;
// 代理节点信息接口
interface ProxyOption {

View File

@@ -4,7 +4,7 @@ import { mutate, type MutatorCallback } from "swr";
import useSWRSubscription from "swr/subscription";
import { type Message, type MihomoWebSocket } from "tauri-plugin-mihomo-api";
export const RECONNECT_DELAY_MS = 500;
export const RECONNECT_DELAY_MS = 100;
type NextFn<T> = (error?: any, data?: T | MutatorCallback<T>) => void;

View File

@@ -48,7 +48,7 @@ const WORKER_CONFIG = {
rawDataMinutes: 10,
compressedDataMinutes: 60,
compressionRatio: 5,
snapshotIntervalMs: 250,
snapshotIntervalMs: 100,
defaultRangeMinutes: 10,
};