xP: speed up log decoding
This commit is contained in:
parent
b53fc1918f
commit
9cf44aa4dd
@ -117,8 +117,10 @@ class RelayRpc extends EventTarget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
base64decode(str) {
|
base64decode(str) {
|
||||||
return decodeURIComponent(atob(str).split('').map(c =>
|
const text = atob(str), bytes = new Uint8Array(text.length)
|
||||||
'%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)).join(''))
|
for (let i = 0; i < text.length; i++)
|
||||||
|
bytes[i] = text.charCodeAt(i)
|
||||||
|
return new TextDecoder().decode(bytes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user