mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-18 16:30:32 +08:00
perf: reduce various timeout and retry intervals for improved responsiveness to fetch proxy infomation (#6072)
This commit is contained in:
parent
6ded9bdcde
commit
6477dd61c3
@ -27,8 +27,13 @@ import {
|
|||||||
useTheme,
|
useTheme,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import React from "react";
|
import React, {
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
useCallback,
|
||||||
|
useEffect,
|
||||||
|
useMemo,
|
||||||
|
useRef,
|
||||||
|
useState,
|
||||||
|
} from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useNavigate } from "react-router";
|
import { useNavigate } from "react-router";
|
||||||
import { delayGroup, healthcheckProxyProvider } from "tauri-plugin-mihomo-api";
|
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_PROXY = "clash-verge-selected-proxy";
|
||||||
const STORAGE_KEY_SORT_TYPE = "clash-verge-proxy-sort-type";
|
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_DEFAULT_INTERVAL_MINUTES = 5;
|
||||||
|
const AUTO_CHECK_INITIAL_DELAY_MS = 100;
|
||||||
|
|
||||||
// 代理节点信息接口
|
// 代理节点信息接口
|
||||||
interface ProxyOption {
|
interface ProxyOption {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { mutate, type MutatorCallback } from "swr";
|
|||||||
import useSWRSubscription from "swr/subscription";
|
import useSWRSubscription from "swr/subscription";
|
||||||
import { type Message, type MihomoWebSocket } from "tauri-plugin-mihomo-api";
|
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;
|
type NextFn<T> = (error?: any, data?: T | MutatorCallback<T>) => void;
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ const WORKER_CONFIG = {
|
|||||||
rawDataMinutes: 10,
|
rawDataMinutes: 10,
|
||||||
compressedDataMinutes: 60,
|
compressedDataMinutes: 60,
|
||||||
compressionRatio: 5,
|
compressionRatio: 5,
|
||||||
snapshotIntervalMs: 250,
|
snapshotIntervalMs: 100,
|
||||||
defaultRangeMinutes: 10,
|
defaultRangeMinutes: 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user