Giter Site home page Giter Site logo

Memory leak about telegram-bot-api HOT 7 CLOSED

pyed avatar pyed commented on May 19, 2024
Memory leak

from telegram-bot-api.

Comments (7)

Syfaro avatar Syfaro commented on May 19, 2024

Hmm... you're definitely right that there's a memory leak somewhere.

I think it has something to do with the form, but I'm not entirely sure. I'll work on figuring out what's happening.

from telegram-bot-api.

Syfaro avatar Syfaro commented on May 19, 2024

Well, this is what's using the most memory.

(pprof) top
26184.78kB of 26184.78kB total (  100%)
Dropped 33 nodes (cum <= 130.92kB)
      flat  flat%   sum%        cum   cum%
   24648kB 94.13% 94.13%    24648kB 94.13%  bytes.makeSlice

report

from telegram-bot-api.

Syfaro avatar Syfaro commented on May 19, 2024

This might be a limitation in Go.

moby/moby#1922 (comment)

from telegram-bot-api.

pyed avatar pyed commented on May 19, 2024

so nothing we can do about it ?

I can confirm that github.com/rockneurotiko/go-tgbot has the same issue

from telegram-bot-api.

Syfaro avatar Syfaro commented on May 19, 2024

Well, this commit will reduce memory usage, a 30MiB test file increases my memory usage by ~2MB.

That upload function is pretty much identical to mine, so I don't know what the difference could be.

from telegram-bot-api.

pyed avatar pyed commented on May 19, 2024

I just tried it out, it is a great improvement.

from telegram-bot-api.

Syfaro avatar Syfaro commented on May 19, 2024

If in the future anyone comes up with a better solution, I'd be happy to reopen this. Until then, I'm going to close it.

from telegram-bot-api.

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.