Jump to content
CCleaner Community Forums
taaf

Delete all prefetch files

Recommended Posts

It would be nice if you offer an (advanced) option to Ccleaner delete all prefetch files.

 

 

 

 

 

 

THIAGO FREIRE

(Brazil)

Share this post


Link to post
Share on other sites

Thiago, tick 'Old Prefetch Data' in Cleaner/Windows/Advanced.

Share this post


Link to post
Share on other sites

Deleting all prefetch files is not safe.

Windows and programs need this files in order to work properly.

 

Quoting from piriform docs:

"CCleaner deletes old prefetch data for programs that no longer exist or haven't been used in a long time."

 

If you still want to take the risk try Options > Include

Share this post


Link to post
Share on other sites
Deleting all prefetch files is not safe.

Windows and programs need this files in order to work properly.

 

Quoting from piriform docs:

"CCleaner deletes old prefetch data for programs that no longer exist or haven't been used in a long time."

 

If you still want to take the risk try Options > Include

 

Perfectly safe actually to delete .pf files, Here are some instructions

1)Give %systemroot%\prefetch permission to evryone

2)Add lines

[Advanced Prefetch Clean]

LangSecRef=3003

Default=True

FileKey1=%systemroot%\Prefetch|*.pf

 

to winsys2.ini (Create if not already there)

3)Cleans all of it now!

Share this post


Link to post
Share on other sites

Contrary to popular belief, Prefetch is there for a reason. The entre idea of prefetch is to pre-load components for programs that you use often to speed up their launch. Prefetch does not contain any "vital" components for running programs, but is actually just an optimization that microsoft built into the operating system. Deleting the prefetch data has a SLIGHTLY positive effect on boot time, but slows down the launch of your commonly used programs. Deleting all prefetch data does more harm than good, although microsoft does say that it can sometimes have a slightly detrimental effect on EWF performance, but this is not a consideration for almost any PC users. The space that you (temporarily) save is insignificant, but the decrease in performance is noticeable.

 

I just ran some program opening benchmarks on my laptop, which measured the opening (time from execution start to window appearing) speed for three of my programs (twice per program), deleted all prefetch data, rebooted, and ran again. The Result was an average of a 19.627% drop in program opening speed.

 

Although I admit I did not do this in a perfectly controlled environment (such as a fresh virtual machine), this is a significant enough change for me to say that deleting all prefetch data is a mistake.

 

If you still believe that prefetch is a waste of space, you can disable it by following Microsoft's instructions here.

Share this post


Link to post
Share on other sites

Nice work NerdFencer.

 

I agree with you,

it is safe but the space that you temporarily save is insignificant,

and the decrease in performance is noticeable.

Share this post


Link to post
Share on other sites
Nice work NerdFencer.

 

I agree with you,

it is safe but the space that you temporarily save is insignificant,

and the decrease in performance is noticeable.

 

 

When you have a 3,200 mhz machine with a gig of ram, you just don't care if it takes longer, since "longer" is still short anyway.

In addition, deleting PF files could have a very positive affect.

 

Ever wondered what happens on malware infested machines that have been cleaned of malware, & windows still tries to load non-existent malware entries on startup which slows things down?

 

Think about the bright side of this!

Share this post


Link to post
Share on other sites
When you have a 3,200 mhz machine with a gig of ram, you just don't care if it takes longer, since "longer" is still short anyway.

In addition, deleting PF files could have a very positive affect.

 

Ever wondered what happens on malware infested machines that have been cleaned of malware, & windows still tries to load non-existent malware entries on startup which slows things down?

 

Think about the bright side of this!

 

 

Sorry but I agree with Nerdfencer too. Besides if you were to have a malware program once you clean your system just go and check out the prefetch folder and delete the malware program's file manually.

Share this post


Link to post
Share on other sites

The Prefetch data folder can help programs, used previously, start a little quicker. Cleaning this folder on a monthly/bimonthly basis, rather than daily/weekly, would make better sense. I must be missing something here, but is there a reason why cleaning the Superfetch folder (XP's Prefetch sibling) is not available in CCleaner for Vista? Though Superfetch is an improvement on the whole prefetch idea, I would still like to clean it out monthly/bi-monthly.

Share this post


Link to post
Share on other sites

The prefetch folder does not (I believe) cause any program components to be loaded into memory, but builds a trace file for commonly used applications. When the application is called by the user the prefetch folder is searched and if a relevant trace file is found it is used to prefetch the relevant components in one go before the application is allowed to launch.

 

There is a trace file in the prefetch folder for the boot process, so disabling prefetching should slow boot time, not speed it up.

 

As the prefetch folder contains no executable data it should not be a significant malware hiding place.

 

What was unknown to me is that there is a file named Layout.ini in the prefetch folder that holds a list of files and directories in the order that they are referenced during boot or application start. Every three days or so, during system idle periods, the Task Scheduler updates Layout.ini and then launches the sys defragger with a command-line option that only defrags the files pointed to by Layout.ini. Defragger finds a contiguous area on each volume large enough to hold all the listed files and directories and moves them in their entirety into that area. Future prefetch operations will even be faster as all the data to be read is stored physically on the disk one after the other in the order it will be read.

 

Now who would want to deny Windows that clever trick?

Share this post


Link to post
Share on other sites

So you're saying that emptying the prefetch folder (which is an available option in CCleaner for XP) would slow down boot time due to the "missing" layout.ini file? But again, why isn't the option to empty the prefetch (called superfetch in Vista) not applicable to Vista?

Share this post


Link to post
Share on other sites

One would, or might, think that disabling prefetch and thus not having the boot trace file available would slow boot time, but I have no data on this. I assume the point of the boot trace file is to speed up boot time. (It's NTOSBOOT-B00DFAAD.pf, not Layout.ini, that is the boot trace file, Layout.ini is used to defrag prefetch files.)

 

I really couldn't say why Vista does anything. I guess M/S thinks it's better that way.

 

If you used CC to clean the prefetch folder then it wouldn't touch either the boot trace file or Layout.ini, as it only cleans old and invalid entries, according to the documentation. So boot time would be unaffected.

Share this post


Link to post
Share on other sites

I agree with the above, but the fact is that when cleaning up my PC I go to Start>Run>prefetch>Select All>Delete. It cleans out hundreds of obsolete entries (which CCleaner should have caught), and on restart the necessary ones come back.

 

Thanks.

Share this post


Link to post
Share on other sites

The only way CCleaner could delete obsolete PF entries would be to do a search for every EXE on the computer, and delete PF files if they don't "belong" to an EXE. This is not the way CCleaner works.

Share this post


Link to post
Share on other sites

I think that a clearout now and again would be beneficial. My Layout.ini has hundreds of obsolete entries that I don't particularly want defragging every few days.

Share this post


Link to post
Share on other sites
I agree with the above, but the fact is that when cleaning up my PC I go to Start>Run>prefetch>Select All>Delete. It cleans out hundreds of obsolete entries (which CCleaner should have caught), and on restart the necessary ones come back.

 

Thanks.

Something is wrong with your OS. The Prefetch folder is self cleaning at 128 entries. When the 128 limit is reached Windows will delete all but the 32 most used prefetch files. This is also why cleaning prefetch, on a properly operating system, is pointless.

Share this post


Link to post
Share on other sites
Something is wrong with your OS. The Prefetch folder is self cleaning at 128 entries. When the 128 limit is reached Windows will delete all but the 32 most used prefetch files. This is also why cleaning prefetch, on a properly operating system, is pointless.

Rubbish. Maybe you're not familiar with XP. I see CCleaner as ticked for cleaning out 'Old Preftech data'. Mustn't be working??

Share this post


Link to post
Share on other sites

I think "Old Prefetch Data" means "files in C:\Windows\Prefetch\ older than X days"....

Anyway, cleaning Prefetch is not a good idea and will not improve your computer's performance (even if lots of sites are saying disabling Prefetch is good)

 

I think Microsoft programmers know better what is good and what is not than most of the users.

Share this post


Link to post
Share on other sites

Superfetch (Prefetch's cousin in Vista) cannot be manipulated with CCleaner. Did the developers of CCleaner decide that manipulating Superfetch was not a good idea?

Share this post


Link to post
Share on other sites
Rubbish. Maybe you're not familiar with XP. I see CCleaner as ticked for cleaning out 'Old Preftech data'. Mustn't be working??

I run Windows XP on several machines and have observed the self-cleaning. It seems to require layout.ini to update after 128 pf files have accumulated and a subsequent reboot. Because layout.ini only updates periodically, it may take up to 3 days for this to transpire.

 

If you Google "Windows XP prefetch 128", you'll find numerous references regarding the self-limiting behaviour from reliable sources.

 

One good reason to empty the prefetch folder is if a pf file or layout.ini is corrupt. I have encountered one machine where there was an error message to that effect and execessive pf files seemed to have accumulated. After deleting everything including the layout.ini, it seemed to self-maintain.

 

If you check Vista Help for "prefetch", you'll find an article stating "The prefetch folder is self-maintaining, and there's no need to delete it or empty its contents." AFAIK that means it is also self-limiting but I don't know if the size limits and parameters are the same as XP.

Share this post


Link to post
Share on other sites

Contrary to popular belief, Prefetch is there for a reason. The entre idea of prefetch is to pre-load components for programs that you use often to speed up their launch. Prefetch does not contain any "vital" components for running programs, but is actually just an optimization that microsoft built into the operating system. Deleting the prefetch data has a SLIGHTLY positive effect on boot time, but slows down the launch of your commonly used programs. Deleting all prefetch data does more harm than good, although microsoft does say that it can sometimes have a slightly detrimental effect on EWF performance, but this is not a consideration for almost any PC users. The space that you (temporarily) save is insignificant, but the decrease in performance is noticeable.

 

I just ran some program opening benchmarks on my laptop, which measured the opening (time from execution start to window appearing) speed for three of my programs (twice per program), deleted all prefetch data, rebooted, and ran again. The Result was an average of a 19.627% drop in program opening speed.

 

Although I admit I did not do this in a perfectly controlled environment (such as a fresh virtual machine), this is a significant enough change for me to say that deleting all prefetch data is a mistake.

 

If you still believe that prefetch is a waste of space, you can disable it by following Microsoft's instructions here.

 

This sounds fine, as long as prefetch is working good & all your programs are there. But just as many times as it helps, it is also detrimental to performance. What happens, is EXE are regularly removed, uninstalled, renamed, deleted, etc & the prefetch folder attempts to load something that no longer exists, slowing the boot process down while windows checks for that program & no longer finds it.

 

Additionally, when you have malware & the malware is prefetched too, you do not really want that to happen, do you? Faster loading malware? Also, what happens when you remove malware, but the prefetch entries still exist? Hmmm?

 

Adding the ability to totally remove the Prefetch folder will NOT harm anything. At worst, the layout will be recreated, & users will be able to delete all the entries so they can get rid of malware that is already set to prefetch, in addition to missing EXE files they have deleted/moved/uninstalled.

 

There may be "downsides" to removing the prefetch folder such as more time booting, but there are so many benefits, I see no reason it should not be included!

Share this post


Link to post
Share on other sites

Hey everyone please note the people you are quoting are long gone. . . that said

 

RoninV has a good question. . . though maybe s/he should start a new thread for it.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...