Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching large 20MB 'feeds' (philosopher.life) stalls the browser. #1

Closed
kickscondor opened this issue Nov 1, 2019 · 3 comments
Closed
Assignees
Labels
bug Something isn't working underway I'm on it
Milestone

Comments

@kickscondor
Copy link
Owner

The complete file is loaded in the background script - so I'm not sure why it's stalling the main page - particularly since only a limited bit of data is passed back to that page. I need to spend some time making a simple extension that can isolate the problem.

In Beaker's case, there are some fundamental problems with its underlying RPC communication between the browser and the experimental APIs. I took a first stab at solving that here: pfrazee/pauls-electron-rpc#6. However, I would need to spend serious time on Beaker to solve this, taking time away from this project - which is more pressing for me at the moment.

@kickscondor kickscondor added the bug Something isn't working label Nov 1, 2019
@kickscondor kickscondor self-assigned this Nov 1, 2019
@kickscondor
Copy link
Owner Author

It appears that the background window and the renderer windows for web extensions share a thread - the messaging is completely async now. (And this works in the Electron app.)

@kickscondor kickscondor added the underway I'm on it label Dec 16, 2019
@kickscondor
Copy link
Owner Author

Ok, solving this involves:

  • Fixing sax-js to use Uint8Array directly.
  • Rewriting feedme. (Needs to happen anyway.) Or maybe just using sax-js and that's it.
  • Moving away from await res.text() to using ReadableStream. (let {done, value} = reader.read() puts a Uint8Array in the value.)

@kickscondor
Copy link
Owner Author

Ok - so the workaround I have for now in the web extension is to use a content script on https://fraidyc.at/s/ that communicates with the background script. It appears that if I try to use a local chrome-extension:// index.html, it will freeze on this because it shares a VM with the background script.

So, this has unfortunately made #51 worse - but has made Fraidycat usable for me personally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working underway I'm on it
Projects
None yet
Development

No branches or pull requests

1 participant