+ Reply
Results 1 to 1 of 1

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: [REL] hoover.sh v1.0 (2011-01-08) :: A Free, Open-source Database Cleaner

is a discussion within the

Native iPhone / iPod Touch App Launches

forums, a part of the

3rd Party Apps For iPhone | iPod Touch

section;
[REL] hoover.sh v1.0 (2011-01-08) A Free, Open-source Database Cleaner =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= by Laga Mahesa, aka Stone-D ([email protected], http://www.stone-d.net ) Copyright Laga Mahesa 2011, All Rights Reserved. Licensed under Creative Commons "by-nc-sa"
...
  1. #1
    What's Jailbreak?
    Join Date
    Dec 2010
    Location
    Jakarta, Indonesia
    Posts
    5
    Thanks
    0
    Thanked 2 Times in 1 Post
    Lightbulb [REL] hoover.sh v1.0 (2011-01-08) :: A Free, Open-source Database Cleaner

    [REL] hoover.sh v1.0 (2011-01-08)
    A Free, Open-source Database Cleaner
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    by Laga Mahesa, aka Stone-D ([email protected], http://www.stone-d.net)
    Copyright Laga Mahesa 2011, All Rights Reserved.
    Licensed under Creative Commons "by-nc-sa"
    Essentially : must attribute, share similarly, for non-commercial use
    Detailed Info : http://creativecommons.org/licenses/by-nc-sa/3.0/
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

    This script will do the following :

    - scan for any *.db and *.sqlite* files in the current folder and below
    - run the VACUUM query on each file
    - produce hoover.log ( a textfile documenting hoover's actions )

    Why?

    Over time, databases (like the Windows Registry) get filled with gaps
    where data has been deleted for one reason or another. This gap, if big
    enough, will get used by the next - leftover space will go unused.

    These spaces result in fragmentation, reduced performance and a larger
    than necessary database.

    Your mileage may vary.

    Applications that frequently move alot of data will benefit from this :
    RSS readers (eg Reeder, which uses 3 databases) and most offline reader
    apps (eg ReadItLater).

    From http://www.sqlite.org/lang_vacuum.html :

    The VACUUM command rebuilds the entire database.

    Unless SQLite is running in auto_vacuum=FULL mode, when a large amount
    of data is deleted from the database file it leaves behind empty space,
    or 'free' database pages. This means the database file might be larger
    than strictly necessary.

    Running VACUUM to rebuild the database reclaims this space and reduces
    the size of the database file.

    Frequent inserts, updates, and deletes can cause the database file to
    become fragmented - where data for a single table or index is scattered
    around the database file. Running VACUUM ensures that each table and
    index is largely stored contiguously within the database file. In some
    cases, VACUUM may also reduce the number of partially filled pages in
    the database, reducing the size of the database file further.

    WARNING!
    If you are running this on an iDevice, please remember that its memory
    has a limited lifespan - such is the nature of flash memory. Don't run
    this too often, avoid the urge towards compulsion. Once a week at the
    most should be your limit, especially if you're hoovering the iDevice's
    entire filesystem.

    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    PS: Don't expect to find anything on my website yet, I'm lazy.
    When emailing me, please prefix the subject with "hoover:"
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


    Sample Output :

    Searching for *.db...
    Processing : ./db/WebMD.db ( 1306 kB | 1337344 bytes )
    Completed : ./db/WebMD.db ( 1293 kB | 1324032 bytes )
    Savings : 13 kB ( 13312 bytes )
    Processing : ./db/friends.db ( 100 kB | 102400 bytes )
    Completed : ./db/friends.db ( 92 kB | 94208 bytes )
    Savings : 8 kB ( 8192 bytes )
    Processing : ./db/reeder-data.db ( 5591 kB | 5725184 bytes )
    Completed : ./db/reeder-data.db ( 4708 kB | 4820992 bytes )
    Savings : 883 kB ( 904192 bytes )
    Processing : ./db/reeder-sync.db ( 3 kB | 3072 bytes )
    Completed : ./db/reeder-sync.db ( 2 kB | 2048 bytes )
    Savings : 1 kB ( 1024 bytes )
    Processing : ./db/reeder.db ( 2313 kB | 2368512 bytes )
    Completed : ./db/reeder.db ( 1973 kB | 2020352 bytes )
    Savings : 340 kB ( 348160 bytes )
    Searching for *.sqlite*...
    Processing : ./db/clarusx6.sqlite ( 72 kB | 73728 bytes )
    Completed : ./db/clarusx6.sqlite ( 27 kB | 27648 bytes )
    Savings : 45 kB ( 46080 bytes )
    Processing : ./db/iNet.sqlite ( 396 kB | 405504 bytes )
    Completed : ./db/iNet.sqlite ( 376 kB | 385024 bytes )
    Savings : 20 kB ( 20480 bytes )
    Processing : ./db/readItLater.sqlite ( 134 kB | 137216 bytes )
    Completed : ./db/readItLater.sqlite ( 28 kB | 28672 bytes )
    Savings : 106 kB ( 108544 bytes )
    Processing : ./db/worldviewlive.sqlite ( 622 kB | 636928 bytes )
    Completed : ./db/worldviewlive.sqlite ( 4 kB | 4096 bytes )
    Savings : 618 kB ( 632832 bytes )
    Total Saved : 2037 kB ( 2085888 bytes )


    Originally posted to:

    http://modmyi.com/forums/native-ipho...-app-launches/

    Feel free to repost wherever you wish, as long as you keep this text.

    Make sure you chmod +x hoover.sh or it won't work, obviously.
    Attached Files Attached Files
    Last edited by Stone-D; 01-08-2011 at 06:39 AM. Reason: Typo

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts