mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-04 02:01:57 +00:00
Merge pull request #4183 from overleaf/jpa-use-memory-views
[perf] serviceWorker: use memory view on large chunks instead of slicing GitOrigin-RevId: 10933b25500aebc0b236315aceca4c44089c79e6
This commit is contained in:
parent
2293713e96
commit
a06031425b
1 changed files with 1 additions and 1 deletions
|
@ -415,7 +415,7 @@ function processPdfRequest(
|
|||
if (offsetStart > 0 || offsetEnd > 0) {
|
||||
// compute index positions for slice to handle case where offsetEnd=0
|
||||
const chunkSize = chunk.end - chunk.start
|
||||
data = data.slice(offsetStart, chunkSize - offsetEnd)
|
||||
data = data.subarray(offsetStart, chunkSize - offsetEnd)
|
||||
}
|
||||
const insertPosition = Math.max(chunk.start - start, 0)
|
||||
reAssembledBlob.set(data, insertPosition)
|
||||
|
|
Loading…
Reference in a new issue