Apryse/PDFTron Webviewer worker does not release memory after calling closeDocument or dispose in Edge

I have apryse webviewer (client-side only), and had it setup as recommended in the docs wherein we’re using only 1 instance of webviewer, and calling loadDocument to change files to be previewed.

When loading an excel document (around 2-3mb) in Edge, memory increase up to 3gb when checked via browser’s task manager.
When closing the modal, we tried calling dispose and closeDocument, however, the memory is not released and task manager still displays 3gb.
The task manager displays PDFWorker and OfficeWorker under the tab, and in the memory tool, it shows that the workers have large ArrayBufferJs values.

At first, issue also occurs in Chrome, but after changing the backend type to asm, it was resolved.
However, problem still exists for Edge.
Is there a way to release the memory used in the pdf/office worker?
Problem is when the user opens another file, memory increases again and the browser ends up crashing.

*The excel file contains sheets that have infinite column headers (click row header and change fill color)

Setup is as follows:

let webviewerInstance = null;

// on mounted, instantiate webviewer
WebViewer(
  {
    path: '../../../lib',
    licenseKey: LICENSE_KEY,
    backendType: "asm",
  },
  document.getElementById('viewer')
).then(instance => {
  // store instance for later use
  this.webviewerInstance = instance;
});

// on click button, fetch data and open modal containing webviewer UI
/** fetch goes here **/
...
let fileUint8Array = new Uint8Array(buffer);
let file = new Blob([fileUint8Array], { type: "application/octet-stream" });
this.webviewerInstance.UI.loadDocument(file, { filename: "sample", extension: "xlsx" });
fileUint8Array = null;
file = null;

// on click close modal containing webviewer UI
this.webViewerInstance.UI.dispose();
this.webViewerInstance.UI.closeDocument();

We tried the following but to no avail:

  • calling dispose
  • calling closeDocument
  • tried different backend types asm ems wasm
  • replacing previous Webviewer with a new instance
  • explicitly setting array buffer variables to null for GC
  • calling resetWorker(worker) with new worker in hopes that previous worker will reset

Update
Excel file having infinite number of columns seem to cause the spike in memory.
Tried a similar 2-3mb excel file without infinite columns and it just rendered fine.

We suggest not loading Excel files with infinite trailing cells as this could be causing the memory issue.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật