Skip to content

Conversation

@troyxmccall
Copy link

@troyxmccall troyxmccall commented Nov 26, 2023

Description (What)

added option for declaring custom batch sizes, ie: --batch-size 5 , if no option is specified, the batch defaults to the original 300 count

Justification (Why)

Older hardware experiences a regression of #173

❯ imageoptim -V
3.1.9
❯ imageoptim .
i Running ImageOptim...
! stderr maxBuffer length exceeded

! Please raise an issue at https://github.com/JamieMason/ImageOptim-CLI/issues

    RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded
        at new NodeError (node:internal/errors:388:5)
        at Socket.onChildStderr (node:child_process:476:14)
        at Socket.emit (node:events:537:28)
        at addChunk (node:internal/streams/readable:324:12)
        at readableAddChunk (node:internal/streams/readable:293:11)
        at Readable.push (node:internal/streams/readable:234:10)
        at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

on

❯ neofetch 
                    'c.          [email protected] 
                 ,xNMM.          ---------------------- 
               .OMMMMo           OS: macOS 12.7.1 21G920 x86_64 
               OMMM0,            Host: Macmini7,1 
     .;loddo:' loolloddol;.      Kernel: 21.6.0 
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 5 hours, 3 mins 
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 185 (brew) 
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: bash 5.2.21 
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1920x1080 
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua 
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor 
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Dark) 
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: Apple_Terminal 
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   Terminal Font: SFMono-Regular 
    kMMMMMMMMMMMMMMMMMMMMMMd     CPU: Intel i5-4278U (4) @ 2.60GHz 
     ;KMMMMMMMWXXWMMMMMMMk.      GPU: Intel Iris 
       .cooc,.    .,coo:.        Memory: 5274MiB / 8192MiB 
     

How Can This Be Tested?

  • test custom batch sizes
yarn build
./imageoptim --batch-size 10 ~/path/to/folder/
  • test original settings
./imageoptim ~/path/to/another/folder/

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 this pull request may close these issues.

1 participant