Refined-github: Page freezes after refinded-github Chrome ext runs

Created on 12 Jan 2021  路  8Comments  路  Source: sindresorhus/refined-github

Page that seems to freeze in Chrome when using this ext is: https://github.com/hashicorp/vagrant/issues/11987
Disabling the Refined Github plugin resolves the issue.

I also noticed in the Chrome task manager, the tab jumps to 100% CPU and uses at ~455 MB of memory.

bug good first issue help wanted

All 8 comments

Investigating, thanks for the report

Believe it or not, it's embed-gist-inline. I'll disable it via hotfix

Haha was just about to post!

It's because the linked file is gigantic. A limit needs to be put in place before embedding. PR welcome

A limit or if the file is to large don't embed?

What kind of limit are you thinking?

Didn't have any in mind. I was trying to clarify what you wanted to do.

Yeah, I meant a "limit on gist size", therefore "don't embed if it's larger than the limit"

I'm thinking this can be done in the background fetch via parameter:

const gistData = await browser.runtime.sendMessage({
    fetchJSON: `${link.href}.json`,
    lengthLimit: 1000
});

And then compare that lengthLimit to the Content-Length header _before_ calling .json()

Was this page helpful?
0 / 5 - 0 ratings

Related issues

durka picture durka  路  3Comments

alexanderadam picture alexanderadam  路  3Comments

vanniktech picture vanniktech  路  3Comments

olso picture olso  路  3Comments

hkdobrev picture hkdobrev  路  3Comments