usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
24.77k stars 1.13k forks source link

Previewing big PDF files make bruno unresponsive #1228

Open majkinetor opened 8 months ago

majkinetor commented 8 months ago

PDF preview is implemented in PR https://github.com/usebruno/bruno/pull/982.

With big PDF files (lets say 500 pages), bruno becomes unresponsive. It eventually recovers after a couple of minutes. Opening the same PDF in browser works instantly.

/cc @n00o

balaji-sivasakthi commented 8 months ago

@majkinetor Yeah, I get your point, and I confirmed that I can reproduce it. More than 30 pages should be rendered using web workers. react-pdf itself provides a blog for rendering more than 30 pages, and I will look into this issue.

creating-pdf-files-without-slowing-down-your-app

https://github.com/michaeldzjap/react-pdf-sample/blob/master/src/Viewer.js

https://github.com/wojtekmaj/react-pdf/issues/94