Git Product home page Git Product logo

Comments (3)

ttmx avatar ttmx commented on June 12, 2024

This gets stuck in src/utils/linkParser.ts, in the p.write(data) line, about line 107. It attempts to parse the file you give it as html, which is very slow for a 1GB file.
This is imperfectly but trivially fixed by only p.writing the first 10000 or so characters of the file, this is always instant, and I cannot find websites that don't have their meta tags in the first 10000 characters.

Would it be possible to merge request?

from gnome-shell-pano.

busybox11 avatar busybox11 commented on June 12, 2024

@ttmx I guess you could do a merge request, yeah. Maybe even a fork - this extension does not seem to be supported anymore. I'd love to use your changes, though I don't really have much time to tinker with it and debug the extension.

Maybe a better solution would be to use a separated single thread that will return the extension's preview contents once it's loaded? This won't fix the full file download issue, but it would improve the overall experience.

from gnome-shell-pano.

BLKFSH avatar BLKFSH commented on June 12, 2024

I just faced the same issue. I was very confused when out of nowhere my network usage spiked and then my whole OS froze.
It would be nice to see this fixed, maybe by querying the type of response first and only accepting HTML, images and the like and of course having a size limit so you don't try and download a 1GB file for a preview.
It would be interesting to know how for example Discord handles link previews since they don't have this issue (see below, first link is a file that gets downloaded by the extension, but Discord is smart enough not to do that and only show the preview for the second link which responds with HTTPS/has a preview image in the metadata):
image
For now I guess I'll keep the link preview disabled which sucks because it's a cool feature!

from gnome-shell-pano.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.