0

I have two different images of same file sizes(60kb), one is of JPEG format and the other is PNG format. When I read and write these images into the disk at 1 rps the results are: read TIME: 6.784399ms write TIME: 14.318515ms for PNG

read TIME: 8.077419ms write TIME: 15.207568ms for JPEG.

But when I write these images with sustain load i.e 100 rps, the PNGs write and read time kept on increasing to 1 min each. But with JPEGS also the read TIME and write TIME increased but still in milliseconds.

Sainath
  • 45
  • 4
  • similar to https://stackoverflow.com/questions/51138922/why-does-readimage-and-writeimage-takes-a-lot-of-time-for-png-images-in-imagemag. See answer there – fmw42 Jul 04 '18 at 05:34
  • No it is not the same!! with the same size if i write a PNG image to the disk with sustain load it is taking more time but it is not the case with the JPEGs – Sainath Jul 04 '18 at 05:43
  • Does imgaick.writefile for a png image of same size takes more resources of magickwand than a jpeg image? – Sainath Jul 04 '18 at 05:51
  • That's like saying you can eat a candy bar in 5 seconds and you can thread a needle in 5 seconds, but when you're on a rollercoaster ride, eating the candy bar still takes 5 seconds but threading the needle takes longer. There is no reason why writing a PNG should take the same time or resources or should vary the same way as writing a JPEG - they are two different things. – Mark Setchell Jul 04 '18 at 07:37
  • What could be the solution to decrease the write time at sustain load? and What could be the reason for increase in time during sustain load?tnqs – Sainath Jul 04 '18 at 07:46
  • and if we are able to thread(of width x KB) a needle even in a roller coaster why aren't we able to do another threading(of width same x KB) in a roller coaster? I mean the data length is same!! Need more clarity!!:):) – Sainath Jul 04 '18 at 07:58
  • Trying to do too much concurrently can create problems, with too much effort being spent on task scheduling and swapping and locking of memory and files and IO interrupts, and these overheads can take more time than the useful work. Perhaps breaking the workload into consecutive portions instead of concurrent will improve performance. – fmw42 Jul 04 '18 at 16:46
  • Possible duplicate of [Why does readimage and writeimage takes a lot of time for PNG images in imagemagick?](https://stackoverflow.com/questions/51138922/why-does-readimage-and-writeimage-takes-a-lot-of-time-for-png-images-in-imagemag) – emcconville Jul 04 '18 at 17:43

0 Answers0