Bleachbit hangs for one minute before opening

Forums: 
Forum tags: 

I think I have reported this issue in the past and never found the cause or solution. That thread is here: https://www.bleachbit.org/forum/bleachbit-portable-v16-wont-load

To be clear, i am using a fresh portable version of BleachBit 2.0. But this started happening with my usual BleachBit 2.0 that I use, just with different options ticked. I tried a fresh copy to check if it was some option i had selected or just a corrupted .ini file.

What happened was when I tried to run BleachBit it takes around a minute to load. Checking Task Manager in Windows 10 x64 I see one of my i5 cores is nearly maxed out at 90%. This happens if ESET Internet Security 11.0.159.9 protection is either enabled or paused.

Is there some program I can use to tell me where BleachBit is hanging, so I can properly report the bug? Right now I feel as though I am guessing with no tools to provide you with any information or logs.

BleachBit version: 
2.0
Your operating system: 
Windows 10 x64

Do you have Winapp2.ini enabled? Typically this is enabled in the BleachBit preferences. This can slow down startup because it is checking thousands of files, directories, and registry entries.

I agree that a minute is not acceptable, so removing Winapp2.ini temporarily to measure the difference in speed would help with troubleshooting.

To remove Winapp2.ini, you can go to %APPDATA%\BleachBit and delete the Winapp2.ini file. Make sure the option is disabled in preferences, or it will come back. If you need more detailed instructions, let me know.

I have more options depending on your reply

---
Andrew, lead developer

Winapp2.ini is enabled and the delay only happens with this. If I delete the winapp2.ini, Bleacbit quickly loads, but then downloads/updates winapp2.ini and the delays start again.

I have made sure that all checkboxes have been cleared and still get the delay.

In the preferences enable Winapp2.ini and disable auto-hide. Does this make it much faster (compared to Winapp2.ini enabled with auto-hide enabled)?

---
Andrew, lead developer

Unchecking "Hide irrelevant cleaner" brings the load speed back to what I am used, which is less than a couple of seconds. This definitely fixes the issue for me - load time is now ~1 second rather than ~1 minute when that option is ticked.

That's good for troubleshooting, but I will try for a more permanent solution.

I built a special version that logs extra information about the speed of Winapp2.ini: BleachBit 2.0.675

Please try this version, enable auto-hide, and enable the debug log using the --debug-log command line parameter. Let me know if you need help with this.

If any individual entry in Winapp2.ini takes longer than 3 seconds, it will log it.

It also logs how long it takes to load the whole Winapp2.ini.

---
Andrew, lead developer

I downloaded and installed https://ci.appveyor.com/api/buildjobs/hrb3xpsxp5p84plb/artifacts/BleachB... and ran it using the command "%ProgramFiles(x86)%\BleachBit\bleachbit_console.exe" --gui --debug-log=%USERPROFILE%\desktop\bleachbit.log

This is the copy and paste from the black command prompt window that appears:

BleachBit version 2.0
BleachBit version 2.0
GTK+ version 2.24.10
SQLite version 3.8.11
local_cleaners_dir = None
locale_dir = C:\Program Files (x86)\BleachBit\share\locale\
options_dir = C:\Users\*removed*\AppData\Roaming\BleachBit
personal_cleaners_dir = C:\Users\*removed*\AppData\Roaming\BleachBit\cleaners
system_cleaners_dir = C:\Program Files (x86)\BleachBit\share\cleaners\
locale.getdefaultlocale = ('en_GB', 'cp1252')
os.getenv('APPDATA') = C:\Users\*removed*\AppData\Roaming
os.getenv('LocalAppData') = C:\Users\*removed*\AppData\Local
os.getenv('LocalAppDataLow') = C:\Users\*removed*\AppData\LocalLow
os.getenv('Music') = D:\My Data\Music
os.getenv('USERPROFILE') = C:\Users\*removed*
os.getenv('ProgramFiles') = C:\Program Files (x86)
os.getenv('ProgramW6432') = C:\Program Files
os.getenv('TMP') = C:\Users\*removed*\AppData\Local\Temp
os.path.expanduser('~') = C:\Users\*removed*\
platform.win32_ver[1]() = 10.0.16299
platform.platform = Windows-10-10.0.16299
platform.version = 10.0.16299
sys.argv = ['C:\\Program Files (x86)\\BleachBit\\bleachbit_console.exe', '--gui', '--no-uac', '--gui', '--debug-log=C:\\Users\\*removed*\\desktop\\bleachbit.log']
sys.executable = C:\Program Files (x86)\BleachBit\bleachbit_console.exe
sys.version = 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
win32com.shell.shell.IsUserAnAdmin() = True
__file__ = C:\Program Files (x86)\BleachBit\library.zip\bleachbit\Diagnostic.pyo
Winapp.load_cleaners() took 0.4 seconds
automatically hiding cleaner 'adobe_reader'
automatically hiding cleaner 'amule'
automatically hiding cleaner 'chromium'
automatically hiding cleaner 'filezilla'
automatically hiding cleaner 'gimp'
automatically hiding cleaner 'google_chrome'
automatically hiding cleaner 'google_earth'
automatically hiding cleaner 'google_toolbar'
automatically hiding cleaner 'hexchat'
automatically hiding cleaner 'hippo_opensim_viewer'
automatically hiding cleaner 'java'
automatically hiding cleaner 'libreoffice'
automatically hiding cleaner 'liferea'
automatically hiding cleaner 'miro'
automatically hiding cleaner 'octave'
automatically hiding cleaner 'openofficeorg'
automatically hiding cleaner 'opera'
automatically hiding cleaner 'paint'
automatically hiding cleaner 'pidgin'
automatically hiding cleaner 'realplayer'
automatically hiding cleaner 'safari'
automatically hiding cleaner 'screenlets'
automatically hiding cleaner 'seamonkey'
automatically hiding cleaner 'secondlife_viewer'
automatically hiding cleaner 'silverlight'
automatically hiding cleaner 'thunderbird'
automatically hiding cleaner 'tortoisesvn'
automatically hiding cleaner 'vim'
automatically hiding cleaner 'vlc'
automatically hiding cleaner 'vuze'
automatically hiding cleaner 'warzone2100'
automatically hiding cleaner 'winapp2_google_chrome'
automatically hiding cleaner 'winapp2_mozilla'
automatically hiding cleaner 'winapp2_opera'
automatically hiding cleaner 'windows_defender'
automatically hiding cleaner 'windows_media_player'
automatically hiding cleaner 'winrar'
automatically hiding cleaner 'winzip'
automatically hiding cleaner 'wordpad'
automatically hiding cleaner 'yahoo_messenger'

When "automatically hiding cleaner 'warzone2100'" is displayed, this is the point it hangs for a very long time. So perhaps "automatically hiding cleaner 'winapp2_google_chrome'" is causing the issue? Except I don't have Google Chrome installed.

BleachBit version 2.0
BleachBit version 2.0
GTK+ version 2.24.10
SQLite version 3.8.11
local_cleaners_dir = None
locale_dir = C:\Program Files (x86)\BleachBit\share\locale\
options_dir = C:\Users\*removed*\AppData\Roaming\BleachBit
personal_cleaners_dir = C:\Users\*removed*\AppData\Roaming\BleachBit\cleaners
system_cleaners_dir = C:\Program Files (x86)\BleachBit\share\cleaners\
locale.getdefaultlocale = ('en_GB', 'cp1252')
os.getenv('APPDATA') = C:\Users\*removed*\AppData\Roaming
os.getenv('LocalAppData') = C:\Users\*removed*\AppData\Local
os.getenv('LocalAppDataLow') = C:\Users\*removed*\AppData\LocalLow
os.getenv('Music') = D:\My Data\Music
os.getenv('USERPROFILE') = C:\Users\*removed*
os.getenv('ProgramFiles') = C:\Program Files (x86)
os.getenv('ProgramW6432') = C:\Program Files
os.getenv('TMP') = C:\Users\*removed*\AppData\Local\Temp
os.path.expanduser('~') = C:\Users\*removed*\
platform.win32_ver[1]() = 10.0.16299
platform.platform = Windows-10-10.0.16299
platform.version = 10.0.16299
sys.argv = ['C:\\Program Files (x86)\\BleachBit\\bleachbit_console.exe', '--gui', '--debug-log=C:\\Users\\*removed*\\desktop\\bleachbit.log']
sys.executable = C:\Program Files (x86)\BleachBit\bleachbit_console.exe
sys.version = 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
win32com.shell.shell.IsUserAnAdmin() = False
__file__ = C:\Program Files (x86)\BleachBit\library.zip\bleachbit\Diagnostic.pyo
BleachBit version 2.0
BleachBit version 2.0
GTK+ version 2.24.10
SQLite version 3.8.11
local_cleaners_dir = None
locale_dir = C:\Program Files (x86)\BleachBit\share\locale\
options_dir = C:\Users\*removed*\AppData\Roaming\BleachBit
personal_cleaners_dir = C:\Users\*removed*\AppData\Roaming\BleachBit\cleaners
system_cleaners_dir = C:\Program Files (x86)\BleachBit\share\cleaners\
locale.getdefaultlocale = ('en_GB', 'cp1252')
os.getenv('APPDATA') = C:\Users\*removed*\AppData\Roaming
os.getenv('LocalAppData') = C:\Users\*removed*\AppData\Local
os.getenv('LocalAppDataLow') = C:\Users\*removed*\AppData\LocalLow
os.getenv('Music') = D:\My Data\Music
os.getenv('USERPROFILE') = C:\Users\*removed*
os.getenv('ProgramFiles') = C:\Program Files (x86)
os.getenv('ProgramW6432') = C:\Program Files
os.getenv('TMP') = C:\Users\*removed*\AppData\Local\Temp
os.path.expanduser('~') = C:\Users\*removed*\
platform.win32_ver[1]() = 10.0.16299
platform.platform = Windows-10-10.0.16299
platform.version = 10.0.16299
sys.argv = ['C:\\Program Files (x86)\\BleachBit\\bleachbit_console.exe', '--gui', '--no-uac', '--gui', '--debug-log=C:\\Users\\*removed*\\desktop\\bleachbit.log']
sys.executable = C:\Program Files (x86)\BleachBit\bleachbit_console.exe
sys.version = 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
win32com.shell.shell.IsUserAnAdmin() = True
__file__ = C:\Program Files (x86)\BleachBit\library.zip\bleachbit\Diagnostic.pyo

This is the Bleachbit.log from the same session.

I published BleachBit 2.0.683 that may help isolate the issue. It will log in more detail how long certain parts take and what it is doing.

Would you please try this again like before (with auto-hide and winapp2.ini both enabled)? Feel free to post only the interesting lines from the log file. The whole log is not needed.

If it points out a section that is slow, would you please also let me know how many files the preview finds in that section?

Also, it has two startup improvements, though I believe they may not help your system. One is specific to Linux, and the other relates only to certain options under the System category.

---
Andrew, lead developer

That build seems to have found the problem.

In the Bleacbit window this is shown:

New winapp2.ini was downloaded.
auto-hide check for winapp2_games took 65.31 seconds

For completion this is the complete list of timing shown:

Winapp.load_cleaners() took 0.4 seconds
automatically hiding cleaner 'adobe_reader'
auto-hide check for adobe_reader took 0.00 seconds
automatically hiding cleaner 'amule'
auto-hide check for amule took 0.00 seconds
automatically hiding cleaner 'chromium'
auto-hide check for chromium took 0.01 seconds
auto-hide check for deepscan took 0.00 seconds
automatically hiding cleaner 'filezilla'
auto-hide check for filezilla took 0.00 seconds
auto-hide check for firefox took 0.00 seconds
auto-hide check for flash took 0.00 seconds
automatically hiding cleaner 'gimp'
auto-hide check for gimp took 0.00 seconds
automatically hiding cleaner 'google_chrome'
auto-hide check for google_chrome took 0.01 seconds
automatically hiding cleaner 'google_earth'
auto-hide check for google_earth took 0.00 seconds
automatically hiding cleaner 'google_toolbar'
auto-hide check for google_toolbar took 0.00 seconds
automatically hiding cleaner 'hexchat'
auto-hide check for hexchat took 0.00 seconds
automatically hiding cleaner 'hippo_opensim_viewer'
auto-hide check for hippo_opensim_viewer took 0.00 seconds
auto-hide check for internet_explorer took 0.01 seconds
automatically hiding cleaner 'java'
auto-hide check for java took 0.00 seconds
automatically hiding cleaner 'libreoffice'
auto-hide check for libreoffice took 0.00 seconds
automatically hiding cleaner 'liferea'
auto-hide check for liferea took 0.00 seconds
auto-hide check for microsoft_office took 0.00 seconds
automatically hiding cleaner 'miro'
auto-hide check for miro took 0.00 seconds
automatically hiding cleaner 'octave'
auto-hide check for octave took 0.00 seconds
automatically hiding cleaner 'openofficeorg'
auto-hide check for openofficeorg took 0.00 seconds
automatically hiding cleaner 'opera'
auto-hide check for opera took 0.00 seconds
automatically hiding cleaner 'paint'
auto-hide check for paint took 0.00 seconds
automatically hiding cleaner 'pidgin'
auto-hide check for pidgin took 0.00 seconds
automatically hiding cleaner 'realplayer'
auto-hide check for realplayer took 0.00 seconds
automatically hiding cleaner 'safari'
auto-hide check for safari took 0.00 seconds
automatically hiding cleaner 'screenlets'
auto-hide check for screenlets took 0.00 seconds
automatically hiding cleaner 'seamonkey'
auto-hide check for seamonkey took 0.00 seconds
automatically hiding cleaner 'secondlife_viewer'
auto-hide check for secondlife_viewer took 0.00 seconds
automatically hiding cleaner 'silverlight'
auto-hide check for silverlight took 0.00 seconds
auto-hide check for skype took 0.00 seconds
auto-hide check for system took 0.00 seconds
auto-hide check for teamviewer took 0.00 seconds
automatically hiding cleaner 'thunderbird'
auto-hide check for thunderbird took 0.00 seconds
automatically hiding cleaner 'tortoisesvn'
auto-hide check for tortoisesvn took 0.00 seconds
automatically hiding cleaner 'vim'
auto-hide check for vim took 0.00 seconds
automatically hiding cleaner 'vlc'
auto-hide check for vlc took 0.00 seconds
automatically hiding cleaner 'vuze'
auto-hide check for vuze took 0.00 seconds
automatically hiding cleaner 'warzone2100'
auto-hide check for warzone2100 took 0.00 seconds
auto-hide check for winamp took 0.00 seconds
auto-hide check for winapp2_applications took 0.00 seconds
auto-hide check for winapp2_games took 64.16 seconds
automatically hiding cleaner 'winapp2_google_chrome'
auto-hide check for winapp2_google_chrome took 0.04 seconds
auto-hide check for winapp2_internet took 0.00 seconds
automatically hiding cleaner 'winapp2_mozilla'
auto-hide check for winapp2_mozilla took 0.01 seconds
auto-hide check for winapp2_multimedia took 0.08 seconds
automatically hiding cleaner 'winapp2_opera'
auto-hide check for winapp2_opera took 0.00 seconds
auto-hide check for winapp2_utilities took 0.00 seconds
auto-hide check for winapp2_windows took 0.00 seconds
auto-hide check for winapp2_windows_store took 0.00 seconds
automatically hiding cleaner 'windows_defender'
auto-hide check for windows_defender took 0.00 seconds
auto-hide check for windows_explorer took 0.00 seconds
automatically hiding cleaner 'windows_media_player'
auto-hide check for windows_media_player took 0.00 seconds
automatically hiding cleaner 'winrar'
auto-hide check for winrar took 0.00 seconds
automatically hiding cleaner 'winzip'
auto-hide check for winzip took 0.00 seconds
automatically hiding cleaner 'wordpad'
auto-hide check for wordpad took 0.00 seconds
automatically hiding cleaner 'yahoo_messenger'
auto-hide check for yahoo_messenger took 0.00 seconds

By the way the long list of timings is copied from the second run on Bleachbit.

Interesting. Do you have Steam?

I wonder whether this is related to issue GH #257.

---
Andrew, lead developer

Yes, I hvae Steam installed.

Any information on updates or progress? Let me know if I can help out in any way - ie: more information or testing.

Thanks for working through this.

BleachBit version 2.0.692 should start up much faster on system. It has an optimization for the auto-hide feature when used with Winapp2.ini cleaners. Let me know how this affects startup on your system.

Please also check how many files are in the folder %ProgramFiles%\Steam. (You can count by right clicking on the folder name Steam when browsing C:\Program Files\). My system has ~4000 files after installing Steam and before installing any games. This quantity was part of the problem.

Finally, please check how long it takes to preview Steam under the Games category. On my system this still takes about 10 seconds because there are many files in the folder that is scanned. (Fewer files show up to be cleaned because most files do not pass the filter.)

---
Andrew, lead developer

Tested and it is perfect now! Thank you very much. Is this beta safe to use until a stable version is released? When is the next stable release?

My Steam folder is around 18.9GB, consisting of 91,033 Files, 4,338 Folders. This could be why the problem was noticeable in my particular instance.

Previewing Steam takes around a minute. The same task with CCleaner only takes around 2 seconds. Other noticeable delays under Games was Steam Games taking around 1 minute and 30 seconds (CCleaner took around 2 seconds) and Steam Installers which took around 10 minutes (not a typo!) and 5 seconds, 1(0 seconds with CCleaner).

I hope that bringing these delays to light helps you. If you need more tests or information, let me know.

Yes, version 2.0.692 should be safe to use. I plan for the next stable release in a few months (much faster than the time from 1.12 to 2.0).

I may need to save the "slow preview for Steam" issue for later. So do I not lose it, please consider filing a bug report in GitHub.

---
Andrew, lead developer