Skip to content

Commit

Permalink
perf: decrease cache capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 24, 2023
1 parent 5c6ac6e commit abd4185
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
12 changes: 10 additions & 2 deletions src/auto-imports.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Generated by 'unplugin-auto-import'
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-auto-import
export {}
declare global {
const $$: typeof import('vue/macros')['$$']
Expand Down Expand Up @@ -81,7 +84,6 @@ declare global {
const refThrottled: typeof import('@vueuse/core')['refThrottled']
const refWithControl: typeof import('@vueuse/core')['refWithControl']
const resolveComponent: typeof import('vue')['resolveComponent']
const resolveDirective: typeof import('vue')['resolveDirective']
const resolveRef: typeof import('@vueuse/core')['resolveRef']
const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
const shallowReactive: typeof import('vue')['shallowReactive']
Expand Down Expand Up @@ -110,6 +112,7 @@ declare global {
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast']
const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
Expand Down Expand Up @@ -274,3 +277,8 @@ declare global {
const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
const whenever: typeof import('@vueuse/core')['whenever']
}
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
}
6 changes: 4 additions & 2 deletions src/components.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// generated by unplugin-vue-components
// We suggest you to commit this file into source control
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'

Expand Down
2 changes: 1 addition & 1 deletion src/store/icon-cache.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import LRU from 'lru-cache'

const cache = new LRU<string, HTMLElement>({
max: 10_000,
max: 1_000,
})

const mounted = new Set<HTMLElement>()
Expand Down

0 comments on commit abd4185

Please sign in to comment.