Maybe you can change the way it works, because some file formats (e.g. PNG, WEBP, AVIF, JPEG XL, etc.) need much time to compress the picture (depends on size and format)!
Here are the current steps of XnViewMP:
------------------------------------------------
1. The active 'auto-refresh' checkbox in export dialog compress the picture with the selected settings and save it to calculate the final filesize
2. The generated picture file will not be temperory saved

3. If you use the export button to save the picture file, XnViewMP will compress the original picture again


Optimized workflow:
-------------------------
1. The active 'auto-refresh' checkbox shoud compress the picture with the selected settings and save it temporary to temp folder to calculate the final filesize
2. If the user select the export button, XnViewMP should not compress the picture again and move the temporary stored final picture from step 1 to the destination directory with the entered filename.
You will save 1 step and much time, if you do not compress a picture two times!
These technic should work for all file formats in file export dialog!