gco / rubyripper

Automatically exported from code.google.com/p/rubyripper
0 stars 0 forks source link

Single Image File Analysis Sometimes Hangs and Generally Takes Too Long #465

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enable "Rip to single image".
2. Insert disc.
3. Rip disc.
4. Wait.

What is the expected output? What do you see instead?
Step 4 should be omitted.

A more efficient algorithm or pre-existing tool should be used to analyze the 
wav files after they've been ripped from the disc. The current Ruby 
implementation is inconsistent and sometimes hangs. The "cmp" command exists on 
most systems and is a faster implementation. This tool could be used to 
decrease the analysis time. Alternatively, a more efficient algorithm could be 
written in Ruby as a fallback method.

For my next trick...

I have implemented this solution and the applicable patch is attached to this 
post. If found, the "cmp" tool is used. I have written the fallback Ruby 
algorithm to read data from the files in blocks of 4k so at to be in sync with 
(most) underlying filesystems. This should help increase read speed. Since the 
4k blocks (obviously) do not align with the Redbook block size, I have written 
a binary search algorithm to quickly locate the individual bad bytes in each 4k 
chunk, thus providing a list of offsets for the error'd bytes in the file. This 
is the same output as the "cmp" tool. After the output is received from either 
tool, the bytes are aligned to the appropriate Redbook blocks and those block 
are read from the files.

When run with the "cmp" tool I'm averaging less than 4 seconds for full disc 
(700+MB), two trial image analysis. This will increase linearly as with the 
number of trials.

Original issue reported on code.google.com by bluedrag...@gmail.com on 6 May 2011 at 12:04

Attachments:

GoogleCodeExporter commented 9 years ago
I guess your problems are solved with the 0.6.1 release. If not, let me know.

Original comment by boukewou...@gmail.com on 13 Nov 2011 at 9:59

GoogleCodeExporter commented 9 years ago
Truthfully, I wouldn't know. I haven't upgraded from my patched version of 
0.6.0 since RR isn't useful to me without my other patches (issues 462 through 
466) have been accepted. I don't even know if they've been looked at.

Original comment by bluedrag...@gmail.com on 15 Mar 2012 at 4:34