News for hackers. Stuff that matters.
Re:The Finder’s GUI tax can be very expensive by ythn on Thursday December 08, 2016 @07:30PM (#13135671)
There's a point where printing progress is actually a huge bottleneck to performance. Try it out in python. Make a for loop that loops a million times and prints "Hello". Run the program once normally, and a second time piping the output to a file. You'll find the first one takes 15 seconds, while the second one is near instantaneous.
Re:The Finder’s GUI tax can be very expensive by goldenkek on Thursday December 08, 2016 @08:28PM (#13135931)
This is a false equivalence. As long as the progress is set correctly via messaging (queue) to an alternate UI thread, the time lost will be under a millsecond. The naive print loop you provide is obviously IO bound and print is a blocking IO call. Use an async print IO and youll have much better performance. Narf!!