better theme cache logging
This commit is contained in:
parent
131c763706
commit
d7f76f2f91
1 changed files with 3 additions and 2 deletions
|
@ -95,9 +95,10 @@ export const tryLoadCache = async () => {
|
||||||
if (!data) return null
|
if (!data) return null
|
||||||
let cache
|
let cache
|
||||||
try {
|
try {
|
||||||
const decoded = new TextDecoder().decode(pako.inflate(data))
|
const inflated = pako.inflate(data)
|
||||||
|
const decoded = new TextDecoder().decode(inflated)
|
||||||
cache = JSON.parse(decoded)
|
cache = JSON.parse(decoded)
|
||||||
console.info(`Loaded theme from cache, size=${cache}`)
|
console.info(`Loaded theme from cache, compressed=${Math.ceil(data.length / 1024)}kiB size=${Math.ceil(inflated.length / 1024)}kiB`)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Failed to decode theme cache:', e)
|
console.error('Failed to decode theme cache:', e)
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Add table
Reference in a new issue