Comments (12)
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:
- See if I need to change an existing package
- Write line by line until that existing package
- Template
- 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.
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.
Note: going to hold the ticket open for a bit, see if I can figure out what caused this.
from deb-s3.
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.
@leedm777 - perhaps: https://github.com/krobertson/deb-s3/blob/master/lib/deb/s3/manifest.rb#L46
from deb-s3.
The massive number of dots we were seeing were caused by a parsing bug. PR posted, which even includes a test :-)
from deb-s3.
FWIW, it looks like this bug was introduced between 0.6.2 and 0.7.0.
from deb-s3.
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.
@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.
@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.
Merged the PR and released 0.7.1 earlier this morning. Thanks!
from deb-s3.
Thanks @krobertson and @leedm777 !
from deb-s3.
Related Issues (20)
- 0.9.1 removed the --use-ssl flag
- does not match the server certificate
- How to use gpg2? HOT 1
- gpg: cannot open tty `/dev/tty' HOT 1
- Signing package HOT 1
- weak digest algorithm HOT 1
- --fail-if-exists has no effect HOT 5
- InRelease should be generated by default HOT 4
- Prune orphaned packages from s3
- Method missing `public_url` in #<Seahorse::Client::Response> with --fail-if-exists HOT 1
- error in deb-s3 show: wrong number of arguments
- error in deb-s3 verify HOT 2
- S3-backed configuration configuration file?
- Re-genning `deb-s3` binary
- The authorization header is malformed; the Credential is mal-formed; expecting "<YOUR-AKID>/YYYYMMDD/REGION/SERVICE/aws4_request". HOT 2
- Can't upload packages built with Ubuntu Bionic HOT 3
- create signed repo
- Security: deb-s3 incorporates existing release/manifests without verifying signatures HOT 2
- Maintainers: This is not the repo you're looking for! HOT 3
- Add link to the active fork & transfer gem ownership? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deb-s3.