Author Topic: PDF's very slow again  (Read 3328 times)

0 Members and 1 Guest are viewing this topic.

ludob

  • Guest
PDF's very slow again
« on: June 10, 2011, 03:12:26 PM »
The problem seems to be back (http://forum.avast.com/index.php?topic=75108.0) but worse than ever. Copying a 10M pdf from one HD partition to another takes 50 secs and one core at 100%.
Downloading 2 pdf's of roughly the same length causes my dual core to max out on both cores during tens of seconds resulting in a computer that is completely blocked (only the cursor moves, no window updates). Example: download the 2 pdf's on http://www.bitsavers.org/pdf/borland/turbo_prolog/.
I was on 5.1 and just upgraded to 6.0.1125 for this problem but no change. Virus definitions 110610-0.
2 problems here:
- the long scan time. Probably a bug.
- avastsvc.exe consuming 100% CPU at normal priority and blocking the whole computer. Downloading is a background task. Run the scan in the background! Why run at normal priority? Why inhibit a manual priority level change (taskmgr)? The priority problem is also noticeable when the virus definitions are updated: another background task that interferes with foreground programs. That is poor design.

Offline Asyn

  • Avast √úberevangelist
  • Certainly Bot
  • *****
  • Posts: 76034
    • >>>  Avast Forum - Deutschsprachiger Bereich  <<<
Re: PDF's very slow again
« Reply #1 on: June 10, 2011, 03:27:31 PM »
Downloading 2 pdf's of roughly the same length causes my dual core to max out on both cores during tens of seconds resulting in a computer that is completely blocked (only the cursor moves, no window updates). Example: download the 2 pdf's on http://www.bitsavers.org/pdf/borland/turbo_prolog/.

Tested and confirmed.
W8.1 [x64] - Avast Free AV 23.3.8047.BC [UI.757] - Firefox ESR 102.9 [NS/uBO/PB] - Thunderbird 102.9.1
Avast-Tools: Secure Browser 109.0 - Cleanup 23.1 - SecureLine 5.18 - DriverUpdater 23.1 - CCleaner 6.01
Avast Wissenswertes (Downloads, Anleitungen & Infos): https://forum.avast.com/index.php?topic=60523.0

Offline igor

  • Avast team
  • Serious Graphoman
  • *
  • Posts: 11863
    • AVAST Software
Re: PDF's very slow again
« Reply #2 on: June 10, 2011, 04:24:29 PM »
The problem seems to be back (http://forum.avast.com/index.php?topic=75108.0) but worse than ever. Copying a 10M pdf from one HD partition to another takes 50 secs and one core at 100%.

It's not really "back" - your files are rather special (regarding their internal content / compression), so this is actually a different issue that has always been there.
The PDF parser will be significantly updated, hopefully during the next week - which should make even those files scan very fast.

Downloading is a background task. Run the scan in the background! Why run at normal priority? Why inhibit a manual priority level change (taskmgr)?

Running AvastSvc at background priority would certainly be a bad idea. The shields work synchronously - they block the application making the request (e.g. the file manager you use to copy the files) - and release it after the scanning is done. So, the request has to be processed as soon as possible - you probably wouldn't like to be waiting for an hour for the copy operation to finish, because the scanner (which blocks the copy operation from finishing) is running on background, and something else (a flash animation in a browser window) uses the CPU and has a higher priority than the scanner.
For the downloads, it's very similar - it's not avast! who's making the downloads, but rather your browser that is requesting the data. avast! only makes a scanning proxy.

ludob

  • Guest
Re: PDF's very slow again
« Reply #3 on: June 10, 2011, 04:47:37 PM »
Quote
So, the request has to be processed as soon as possible - you probably wouldn't like to be waiting for an hour for the copy operation to finish, because the scanner (which blocks the copy operation from finishing) is running on background, and something else (a flash animation in a browser window) uses the CPU and has a higher priority than the scanner.
I agree. Although lower priority doesn't mean no OS time slices. You just get the remaining CPU left by higher priority processes, which can be still close to 100%.
The scanning proxy however is clearly not behaving correctly since it won't release to the OS for seconds. Asap can't mean "lock the computer until done".   

Offline igor

  • Avast team
  • Serious Graphoman
  • *
  • Posts: 11863
    • AVAST Software
Re: PDF's very slow again
« Reply #4 on: June 10, 2011, 04:58:52 PM »
Well, we're not in the Win16 world of cooperative multitasking anymore :) - it's not up to the application to "release the CPU", but rather up to the OS to take it.

ludob

  • Guest
Re: PDF's very slow again
« Reply #5 on: June 10, 2011, 07:58:25 PM »
It's not up to the application to "release the CPU", but rather up to the OS to take it.
You surely manage to keep it (the CPU). We'll blame windows, won't we?

I checked with process explorer the thread priority for the avast thread that is locking windows: it runs at priority 10. This is THREAD_PRIORITY_HIGHEST for a process with NORMAL_PRIORITY_CLASS priority. A "normal" process runs at 8. A Flash animation thread (in firefox plugin-container.exe) runs at 8. VLC worker (streaming) threads are at 8,9 and 10 ,15 for directsound thread = THREAD_PRIORITY_TIME_CRITICAL for a normal process. Etc.. No wonder avast blocks everything around, including radio over VLC, except for the mouse. Telling a preemptive OS that your thread is more important than the others is effectively not releasing the CPU. The OS takes it to give it back right away.
I understand your argument users wanting a good response time. But users don't want to be in a situation that their computer is completely locked and can't even cancel the operation (download, ...) that is causing the problem.