IrfanView: slow 'second' opening

T

Terry Pinnell

Can anyone suggest why the following might be happening please? I open
a JPG (say 200-400 KB) in IrfanView by d-clicking its thumbnail in a
WinXP My Computer window. It opens quite briskly. I edit it (e.g. add
a border) and close it. Then, a few seconds later, I decide to do
something else with it, so I d-click it again. This time it takes 1-3
seconds to open. That happened consistently this morning, over an hour
or so.
 
B

B. R. 'BeAr' Ederson

Can anyone suggest why the following might be happening please? I open
a JPG (say 200-400 KB) in IrfanView by d-clicking its thumbnail in a
WinXP My Computer window. It opens quite briskly. I edit it (e.g. add
a border) and close it. Then, a few seconds later, I decide to do
something else with it, so I d-click it again. This time it takes 1-3
seconds to open. That happened consistently this morning, over an hour
or so.

Seems, you encounter the WinXP disk cache on work. There is a mechanism
called deferred writing (or lazy writing). The data currently within the
disk cache will only be written to disk, when one of several conditions
are met. The first checked against is disk idle. The more tools you run
in background, the less likely this state will ever take place. The other
conditions are checked against only within greater time spans.

So if you changed the file it might not be written back to disk when
you try to load it again. The file system driver checks every file
before opening (again), whether there is 'dirty' data inside the disk
cache. If so, it has to wait until the data is flushed to disk.

If you like - you can read a technical article about these things here:

www.microsoft.com/technet/prodtechnol/windows2000serv/maintain/optimize/wperfch7.mspx

It was written for Win2k Server. But the gist (if not every single bit
of the information) remains correct for WinXP.

You can follow the link to SysInternals CacheMan provided on that page,
too. They show a picture with typical values for the NT cache. But you
*should not* use this utility on your XP system!!! SysInternals didn't
declare the program working, neither for Win2k nor for WinXP!

If you don't like to browse through the afore mentioned article - here
is the SysInternals link:

http://www.sysinternals.com/ntw2k/source/cacheman.shtml

HTH.
BeAr
 
T

Terry Pinnell

Seems, you encounter the WinXP disk cache on work. There is a mechanism
called deferred writing (or lazy writing). The data currently within the
disk cache will only be written to disk, when one of several conditions
are met. The first checked against is disk idle. The more tools you run
in background, the less likely this state will ever take place. The other
conditions are checked against only within greater time spans.

So if you changed the file it might not be written back to disk when
you try to load it again. The file system driver checks every file
before opening (again), whether there is 'dirty' data inside the disk
cache. If so, it has to wait until the data is flushed to disk.

If you like - you can read a technical article about these things here:

www.microsoft.com/technet/prodtechnol/windows2000serv/maintain/optimize/wperfch7.mspx

It was written for Win2k Server. But the gist (if not every single bit
of the information) remains correct for WinXP.

You can follow the link to SysInternals CacheMan provided on that page,
too. They show a picture with typical values for the NT cache. But you
*should not* use this utility on your XP system!!! SysInternals didn't
declare the program working, neither for Win2k nor for WinXP!

If you don't like to browse through the afore mentioned article - here
is the SysInternals link:

http://www.sysinternals.com/ntw2k/source/cacheman.shtml

HTH.
BeAr

Thanks. Although it looks a bit daunting to me, I'll study it when I
get some time. Meanwhile, I'll experiment further, maybe with fewer
additional programs running. But on an Athlon 1800, 512MB, I wouldn't
have expected a slow-down, even though admittedly I do use a lot of
stuff.
 
B

B. R. 'BeAr' Ederson

Thanks. Although it looks a bit daunting to me, I'll study it when I
get some time. Meanwhile, I'll experiment further, maybe with fewer
additional programs running. But on an Athlon 1800, 512MB, I wouldn't
have expected a slow-down, even though admittedly I do use a lot of
stuff.

This topic has nothing to do with the speed of your CPU at all. Some
programs and even some services consecutively access files on HD which
cannot be buffered in cache (for long), because other programs access
these files, too. If those requests occur very often and target a part
of your HD which is a fair amount of sectors off your pictures, then
your picture will stay inside the cache until one of the other cache
flush mechanisms hits. Which sure can take several seconds, because
every HD access starts the idle wait again, and again, and again...

You can have a look on the file accesses on your XP machine by running
SysInternals FileMon with 'Include all' (*) and 'Exclude none' filter,
logging all reads, writes and opens. Load FileMon here:

http://www.sysinternals.com/ntw2k/source/filemon.shtml

BeAr
 
T

Terry Pinnell

This topic has nothing to do with the speed of your CPU at all. Some
programs and even some services consecutively access files on HD which
cannot be buffered in cache (for long), because other programs access
these files, too. If those requests occur very often and target a part
of your HD which is a fair amount of sectors off your pictures, then
your picture will stay inside the cache until one of the other cache
flush mechanisms hits. Which sure can take several seconds, because
every HD access starts the idle wait again, and again, and again...

You can have a look on the file accesses on your XP machine by running
SysInternals FileMon with 'Include all' (*) and 'Exclude none' filter,
logging all reads, writes and opens. Load FileMon here:

http://www.sysinternals.com/ntw2k/source/filemon.shtml

BeAr

Thanks for that helpful follow-up.

I do have FileMon but, although it has occasionally given me useful
clues, I usually find it overwhelmingly confusing. I started and
stopped it just now for about 2-3 seconds while opening one of those
image files with IrfanView again, but its content is bewildering.

At first glance, it seems to be making a good attempt at listing every
file on my HD, including many I haven't consciously touched for
months!

And do you know what the hundreds of entries are for folders/files
that don't appear to physically exist, like these:
07:31:16 csrss.exe:472 IRP_MJ_CREATE
C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.1612_x-ww_7c379b08.Manifest
SUCCESS Attributes: Any Options: Open Sequential
07:31:16 csrss.exe:472 IRP_MJ_CREATE
C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.1612_x-ww_7c379b08.Manifest
SUCCESS Attributes: N Options: Open

There were 38 consecutive entries at that point in the output naming
that file/folder, which doesn't appear in Explorer.

Of course, there were many entries amongst the 6,084 total naming the
file and IrfanView, but identifying a 'cause' of the slowness is
daunting!
 
B

B. R. 'BeAr' Ederson

I do have FileMon but, although it has occasionally given me useful
clues, I usually find it overwhelmingly confusing. I started and
stopped it just now for about 2-3 seconds while opening one of those
image files with IrfanView again, but its content is bewildering.

You can use Edit->ExcludeProcess (Apply...? = Yes) to filter the list
step by step. Or you can select all entries and copy them to the
spreadsheet program of your choice. Or simply save the output and
edit it with an editor capable of handling fixed fields text.
At first glance, it seems to be making a good attempt at listing every
file on my HD, including many I haven't consciously touched for
months!

Maybe an AntiVirus or a document indexing program works in background?
I will not exclude a Virus (or such) as a *possibility*. But I don't
think it very likely.
And do you know what the hundreds of entries are for folders/files
that don't appear to physically exist, like these:
07:31:16 csrss.exe:472 IRP_MJ_CREATE
C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.1612_x-ww_7c379b08.Manifest
SUCCESS Attributes: Any Options: Open Sequential
[...]

These entries mean that the driver responsible for handling console
windows and thread steering on user level (csrss.exe) opens files for
maintaining XP styles for controls and windows (= 'Manifests'). These
files are inside a hidden sub-folder of your Windows directory (WinSxS).
That's why you don't see it with Explorer.

Btw.: These graphical gimmicks drive me nuts!! I would be surprised if
more than 1 % of WinXP delivers functionality. The rest is color and
childish appearance... And an important source for bugs and security
leaks, coming to this! :-(
Of course, there were many entries amongst the 6,084 total naming the
file and IrfanView, but identifying a 'cause' of the slowness is
daunting!

You can neglect the entries for IrfanView. *These* have nothing to do
with the cache clearing problems. The only useful information will be
timing entries regarding your picture in comparison to other entries.

Be it as it may, I would be surprised if you could solve your problem
on XP. There are too many system components accessing the HD at any
time. One thing you might try, though, is putting the said picture on
another disk or at least another partition (containing no system files).
That *may* help, because I think the idle timer of the cache depends
on 'per drive' settings.

BeAr
 
T

Terry Pinnell

You can use Edit->ExcludeProcess (Apply...? = Yes) to filter the list
step by step. Or you can select all entries and copy them to the
spreadsheet program of your choice. Or simply save the output and
edit it with an editor capable of handling fixed fields text.

Very handy, thank you! Just adding a couple of filters makes a great
deal of difference to readability. BTW, maybe my version differs a
little from yours/ I don't see 'Edit->ExcludeProcess (Apply...? =
Yes)'. Instead, the command here in File Monitor for Windows NT/9x
v4.34 is Edit>Filter/Highlight... And then I see this dialogue window:
http://www.terrypin.dial.pipex.com/Images/FileMon1.gif
Maybe an AntiVirus or a document indexing program works in background?
I will not exclude a Virus (or such) as a *possibility*. But I don't
think it very likely.

I do have NAV installed. In fact an hour or two ago it finished its
weekly scan (and as usual found me virus-free). No indexing as far as
I know; one of first things I turn off is the Office indexing thing.
One known source of 'constant activity' is ActiveSync, which syncs a
subset of HD files to my Pocket PC, with the program WCESCOMM.EXE.
Entries like these:
09:28:53 wcescomm.exe:1680 IRP_MJ_CLOSE
C:\DOCUME~1\TERRYP~1\LOCALS~1\Temp\WCESCOMM.LOG SUCCESS
09:28:53 wcescomm.exe:1680 IRP_MJ_CREATE
C:\DOCUME~1\TERRYP~1\LOCALS~1\Temp\WCESCOMM.LOG SUCCESS
Attributes: N Options: Open
09:28:53 wcescomm.exe:1680 IRP_MJ_CLEANUP
C:\DOCUME~1\TERRYP~1\LOCALS~1\Temp\WCESCOMM.LOG SUCCESS

But the file entries I was referring to were 'commonplace' files all
over my HD. I'll study further when I can.
And do you know what the hundreds of entries are for folders/files
that don't appear to physically exist, like these:
07:31:16 csrss.exe:472 IRP_MJ_CREATE
C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.1612_x-ww_7c379b08.Manifest
SUCCESS Attributes: Any Options: Open Sequential
[...]

These entries mean that the driver responsible for handling console
windows and thread steering on user level (csrss.exe) opens files for
maintaining XP styles for controls and windows (= 'Manifests'). These
files are inside a hidden sub-folder of your Windows directory (WinSxS).
That's why you don't see it with Explorer.

Do you mean there is another, more elusive category of 'Hidden'
folders than the one in Tools>Folder Options>View>Advanced
Settings>'Hidden files and folders'? I always keep that enabled.
Btw.: These graphical gimmicks drive me nuts!! I would be surprised if
more than 1 % of WinXP delivers functionality. The rest is color and
childish appearance... And an important source for bugs and security
leaks, coming to this! :-(

Agreed. But, like millions of others, I'm a captive MS user now, so
little I can do about it ;-(
You can neglect the entries for IrfanView. *These* have nothing to do
with the cache clearing problems. The only useful information will be
timing entries regarding your picture in comparison to other entries.

OK, understood, thanks.
Be it as it may, I would be surprised if you could solve your problem
on XP. There are too many system components accessing the HD at any
time. One thing you might try, though, is putting the said picture on
another disk or at least another partition (containing no system files).
That *may* help, because I think the idle timer of the cache depends
on 'per drive' settings.

Will try that.

Much appreciate your guidance here.
 
B

B. R. 'BeAr' Ederson

On Sun, 08 May 2005 09:36:46 +0100, Terry Pinnell wrote:

[FileMon]
BTW, maybe my version differs a
little from yours/ I don't see 'Edit->ExcludeProcess (Apply...? =
Yes)'. Instead, the command here in File Monitor for Windows NT/9x
v4.34 is Edit>Filter/Highlight... And then I see this dialogue window:
http://www.terrypin.dial.pipex.com/Images/FileMon1.gif

Oh. You *should* update. Current is v7.0! Get it here:

www.sysinternals.com/ntw2k/source/filemon.shtml

[WinSxS-folder]
Do you mean there is another, more elusive category of 'Hidden'
folders than the one in Tools>Folder Options>View>Advanced
Settings>'Hidden files and folders'? I always keep that enabled.

Yes, there is. But I wasn't aware that WinSxS falls into that category.
Because FileMon listed 'Success' for accesses into that folder, it does
exist on your computer. Or maybe you first try the newer FileMon. It
*might* be the older version interprets a return value in a wrong way.
Much appreciate your guidance here.

Glad if i can help a bit. :)

BeAr
 
T

Terry Pinnell

On Sun, 08 May 2005 09:36:46 +0100, Terry Pinnell wrote:

[FileMon]
BTW, maybe my version differs a
little from yours/ I don't see 'Edit->ExcludeProcess (Apply...? =
Yes)'. Instead, the command here in File Monitor for Windows NT/9x
v4.34 is Edit>Filter/Highlight... And then I see this dialogue window:
http://www.terrypin.dial.pipex.com/Images/FileMon1.gif

Oh. You *should* update. Current is v7.0! Get it here:
www.sysinternals.com/ntw2k/source/filemon.shtml
Ah, I certainly will. However, I see I have two versions already. But
on now attempting to run the much more recent 6.12 (which I could
swear I have run before, albeit some months ago) I get:
"Filemon located a driver with the wrong version,
If you just installed a new version you must reboot before you are
able to use it."

May pursue that first, as I don't like unsolved puzzles!
[WinSxS-folder]
Do you mean there is another, more elusive category of 'Hidden'
folders than the one in Tools>Folder Options>View>Advanced
Settings>'Hidden files and folders'? I always keep that enabled.

Yes, there is. But I wasn't aware that WinSxS falls into that category.
Because FileMon listed 'Success' for accesses into that folder, it does
exist on your computer. Or maybe you first try the newer FileMon. It
*might* be the older version interprets a return value in a wrong way.

OK, will get back on the case tomorrow.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top