GithubHelp home page GithubHelp logo

Comments (12)

jjshoe avatar jjshoe commented on July 20, 2024

Did some poking, found a couple of things, though nothing that was a smoking gun for me.

https://github.com/krobertson/deb-s3/blob/master/lib/deb/s3/manifest.rb#L82 - It looks like to me that this is getting the results of the package.erb and cramming them all into an array, when it's done, it then calls a join. This was causing my desktop to kill the process for running out of memory. The way to do this would be to write the contents out to the file as generated. I played with this some, and while it prevented it from getting killed on my desktop, it didn't help with overall speed.

All the time was sucked in that generate method though. It seems like the correct approach would be:

  1. See if I need to change an existing package
  2. Write line by line until that existing package
  3. Template
  4. Write line by line until the end

If the package didn't exist it could just be tacked onto the end.

Another performance piece would be instead of writing out manifest into the FH for compressing you could just copy or compress Packages.

I ran it through ruby-prof, however github won't let me attach anything other then images, so you can grab the output here: https://www.dropbox.com/s/pl5kvkounilzvfl/stat.tar?dl=0

from deb-s3.

jjshoe avatar jjshoe commented on July 20, 2024

I found the root cause, my Packages file had lots of entrys of just periods:

[jjshoe@joel-desktop Downloads]$ du -hs Packages 
121M    Packages
[jjshoe@joel-desktop Downloads]$ grep -ve '^\s*.\s*$' Packages > test
[jjshoe@joel-desktop Downloads]$ du -hs test 
88K test
[jjshoe@joel-desktop Downloads]$

from deb-s3.

jjshoe avatar jjshoe commented on July 20, 2024

Note: going to hold the ticket open for a bit, see if I can figure out what caused this.

from deb-s3.

leedm777 avatar leedm777 commented on July 20, 2024

I've looked into this a bit. It appears that blank continuation lines in a description (which are rendered as . in the Packages file) are duplicated when it goes through the parsing process. So for every successive upload, the number of blank lines are doubled.

from deb-s3.

jjshoe avatar jjshoe commented on July 20, 2024

@leedm777 - perhaps: https://github.com/krobertson/deb-s3/blob/master/lib/deb/s3/manifest.rb#L46

from deb-s3.

leedm777 avatar leedm777 commented on July 20, 2024

The massive number of dots we were seeing were caused by a parsing bug. PR posted, which even includes a test :-)

from deb-s3.

leedm777 avatar leedm777 commented on July 20, 2024

FWIW, it looks like this bug was introduced between 0.6.2 and 0.7.0.

from deb-s3.

JeanFred avatar JeanFred commented on July 20, 2024

I am having the same problem − dot lines get duplicated, resulting in a huge Packages file eventually leading deb-s3 to crash when manipulating it.

from deb-s3.

leedm777 avatar leedm777 commented on July 20, 2024

@JeanFred Can you try out my patch to see if it works for you?

I also wrote a fixup command in a branch on my work. I used it to get our Packages files back in order. It's a quick hack, so I highly recommend backups before trying it.

from deb-s3.

JeanFred avatar JeanFred commented on July 20, 2024

@leedm777 I have tried your patch and I’m happy to report that it does work for me − thanks! I tried uploading packages with deb-s3 − which duplicated dots − and then your version − which did not.

I also used (after backup ;-) your fixup command, which worked like a charm and basically saved our lives. Thanks a lot for this.

from deb-s3.

krobertson avatar krobertson commented on July 20, 2024

Merged the PR and released 0.7.1 earlier this morning. Thanks!

from deb-s3.

JeanFred avatar JeanFred commented on July 20, 2024

Thanks @krobertson and @leedm777 !

from deb-s3.

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.