mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-28 07:14:40 +08:00
perf: reduce various timeout and retry intervals for improved responsiveness to fetch proxy infomation (#6072)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ const WORKER_CONFIG = {
|
||||
rawDataMinutes: 10,
|
||||
compressedDataMinutes: 60,
|
||||
compressionRatio: 5,
|
||||
snapshotIntervalMs: 250,
|
||||
snapshotIntervalMs: 100,
|
||||
defaultRangeMinutes: 10,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user