Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too Many Images Prevents Image Picker from Opening #6

Closed
JediSQL opened this issue Dec 24, 2018 · 4 comments · Fixed by #48
Closed

Too Many Images Prevents Image Picker from Opening #6

JediSQL opened this issue Dec 24, 2018 · 4 comments · Fixed by #48

Comments

@JediSQL
Copy link

JediSQL commented Dec 24, 2018

During Convert, if there are too many JPEG image files in the folder with the CUE file, and its sub-folders, the "Select the best match "dialog box (to pick the album art image" does not open, and CUETools jumps straight to the "Select the best match "dialog box that picks the meta data source. It seems 31 image files is OK; 32 is too many.
I'm running CUETools 2.1.6 on Windows 10 (1803).

@c72578
Copy link
Collaborator

c72578 commented Mar 25, 2020

Thanks for your report.
The maximum of 32 for maxChoice is currently defined here:

int maxChoice = CUEToolsSelection == null || Action != CUEAction.Encode ? 1 : 32;

The following line later on in the code is responsible for not showing the list of found images, when there are more than 32:

if (files.Count > maxChoice) return;

Which behavior do you expect or how many images should be the maximum in your case?

@JediSQL
Copy link
Author

JediSQL commented Mar 26, 2020

"How many?" is hard question to answer. I don't have the time to analyze the code for any performance impacts that might result from too large a number. Someone more familiar with the code should make that decision. Does there actually need to be a limit? Was that a decision made back when 1024x768 was the standard screen size and $500 computers didn't have quad-core, 3 GHz processors and terabyte storage?

I have, so far, 288 WAV/CUE/JPG file sets in the folder structure below. As time goes on, I have to keep splitting folders so that I can do encodings with CueTools. In my experience as a programmer, I have found that whenever software sets a limit, there is someone that exceeds it. Whatever the limit is, if it is exceeded, there should be some messaging to the user about what happened and how to work around it. Silent, mystery behavior is aggravating, and it makes folks walk away.

As long as the list of image names is alphabetized, I'd think that 128 or 256 image names would be manageable. But even at 256, if I had all my files in one folder, I still would have run into the problem, and it would probably have been harder to figure out.

RipCUE
+-A
+-B
+-C
+-DEF
+-GHI
+-JK
+-L
+-M
+-NOPQ
+-RS
+-TUVWXYZ
+-Various
+-Zappa
  +-Zappa, Frank 1
  +-Zappa, Frank 2
  +-Zappa, Frank 3
  +-Zappa, Frank 4
  +-Zappa, Frank Singles
  +-Zappa, Frank YCDTOSA
  +-Zappa-Beat the Boots
  +-Zappa-Beefheart
  +-Zappa-Mothers

Thank you for taking the time to look into this. I appreciate it, at least from the point of knowing that it's not me :-) !
Sincerely,
Dan

@c72578
Copy link
Collaborator

c72578 commented Mar 26, 2020

Dear Dan,
thanks for the feedback.
I did some tests in the meantime with 9999 jpg files in the folder and subfolders of a cue sheet.

The following info shows the memory consumption from Windows task manager and the time it took to analyze:

1.) image file size each: 22.8 KB (250x250)
16.4 MB CUETools started
  Go
  Analyzing input file... (1 min 2 s)
  461.1 MB Select best match (online album)
  463.0 MB Select best match (album art)

2.) image file size each: 197 KB (571x571)
16.4 MB CUETools started
  Go
  Analyzing input file... (1 min 40 s)
  3382.7 MB Select best match (online album)
  3391.8 MB Select best match (album art)

CPU:  i7-3687U, nothing special
SSD
Path length of each image file: 113 characters

Remark: the current limit of 32 was rather coming from a typical situation of having just one ore a few images inside an album folder.
So I guess, the maxChoice limit can be increased. What I see from your message above is, that 512 would be sufficient for your number of images. And if there are lots of images (thousands) in the folder of the cue sheet and its subfolders: display an info message and still allow to choose an image.

Best regards
Wolfgang

@JediSQL
Copy link
Author

JediSQL commented Mar 26, 2020

Cool, thanks. I'll keep an eye out for the new release!

c72578 added a commit to c72578/cuetools.net that referenced this issue Mar 30, 2020
CUETools - Encode:
Up to now, when there were more than 32 images in a folder
or in sub-folders of a cue sheet, the method LoadAlbumArt()
returned and the window to select an image was not displayed.
- Increase the limit from 32 to 1000. When there are more images
  than the upper limit, show a message in the progress area
  and continue anyway.
- Show the progress of processed album art image files in percent.
  When e.g. hundreds of image files have to be processed,
  this can take a while and the user sees what's going on.
- Fixes gchudov#6
c72578 added a commit that referenced this issue Apr 10, 2020
CUETools - Encode:
Up to now, when there were more than 32 images in a folder
or in sub-folders of a cue sheet, the method LoadAlbumArt()
returned and the window to select an image was not displayed.
- Increase the limit from 32 to 1000. When there are more images
  than the upper limit, show a message in the progress area
  and continue anyway.
- Show the progress of processed album art image files in percent.
  When e.g. hundreds of image files have to be processed,
  this can take a while and the user sees what's going on.
- Fixes #6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants