Jump to content
Sign in to follow this  
gwent

File Compacting

Recommended Posts

gwent

Good Afternoon

 

I am trying figure out a way to automate "saving file smaller" in FMP7.

 

I use the developer version which has that Compacting as a utility in File Maintenance. My customer has just FileMaker Pro 7. In the "save as" there is a "save file smaller" option which does the Compacting function.

 

I would like to automate this saving option each time the file is closed.

 

Any ideas will be appreciated..

 

greg

Share this post


Link to post
Share on other sites
gwent

I found it. There is a Script Step for "Save File As" and one of the options Smaller.

 

Strange name for a Compacting Utility.

 

Now I will look for a Reindexing Step.

 

greg

Share this post


Link to post
Share on other sites
gwent

Expected Compacting does not occur when I tried "Save as" script step in FMP7. It is forcing me to change name which is not what I want to do. What's the point of Compacting a database file if it's not the one you'll open to continue your work later.

 

I'll keep trying...

 

If anyone out there has any ideas please let me know.

 

greg

Share this post


Link to post
Share on other sites
Maarten Witberg

hi greg,

 

you can specify filepath and name in the dialog. use the same name, it will overwrite.

make a backup before experimenting....

 

kjoe

smile.gif

Share this post


Link to post
Share on other sites
gwent

Good Morning kjoe

 

Thanks for the reply. Your suggestion works fine on my development computer but is not working [?] on my customer's. Investigating now to see why. Will let you know.

 

greg

Share this post


Link to post
Share on other sites
Maarten Witberg

This could be the filepath....

 

kjoe

smile.gif

Share this post


Link to post
Share on other sites
Dale Johnson

Hi Greg -

Not sure why you'd want to save a compressed file after each use.

 

My understanding of that function is to clean up and remove extraneous data that accumulates in a file through use. This occurs especially if lots of records are being imported and deleted I believe.

 

I always save a compressed copy of a file before distribution and for most users there is not much file bloat after that.

 

I have told some users that they could save a compressed copy every six months or once a year to tidy up the file but you usually don't gain much in file reduction. In my experience the files work reliably even when this is not done.

 

Saving a compressed file is nothing like using winzip or dropstuff. If I'm mistaken here I hope someone else will clarify.

 

dale

Share this post


Link to post
Share on other sites
Maarten Witberg

my 2c:

 

Dale raises an interesting point. The FMPro 6 helper says the function among other things, optimizes use of block space on the hard drive. Any file, database, text, whatever, that is frequently modified will tend to use up more harddrive space than the actual size of the file. A file modification will be written to a new block rather than overwriting the old one, that wll still be hogged by the file. Highly fragmented files/disks will show performance loss. There are general purpose programs that tackle this, such as Norton disk doctor.

 

Current harddrives are so large and cpus so fast that for most users and most files, inefficient disk space usage will seldom become problematic (set aside high end music or video files). Whether or not file compacting of a fm file is useful, depends on the size of the file, the number of files, on modification rates and on network circumstances (run from a server, run on a workstation). A caveat is that the fmhelper says that compacting large files is time-consuming and suggests running a compacting script at night. A run on each file shutdown seems to be a bit much.

 

A subroutine in the shutdown script to modify compacting could be this (for standalone):

 

#other shutdown steps
set field[g_compact_counter, g_compact_counter+1]
if [g_compact_counter>100]
show message["It is advisable to optimize the file. This may take some time. Proceed now or later?"
#button1=proceed, button2=later]
if[status(currentmessagechoice=1]
set field[g_compact_counter, "1"]
save as[#your settings]
end if
end if

finally, winzip and dropstuff will result in very compact files but as these are archived, they are not functional untill they get decompressed.

 

kjoe

smile.gif

Share this post


Link to post
Share on other sites
gwent

Thanks Guys,

 

The current file is approximately 3.7 MB in size with 6,000 + records in the Customer Comment Table. I've noticed after the customer enters a few Comment Cards and generates a few Reports the file grows rather quickly to 4.5 MB. If I compact the file at that time it returns to almost the original size.

 

I am a little concerned about what appears to be apparent rapid growth but after Compacting the file it returns almost to the beginning size for that session. The Compacting only takes a few seconds to complete.

 

My thought was to control this rapid size increase by automating the Compacting with closing the file. This a normal procedure I am familiar with in MS Access and thought perhaps it was a good idea in FMP 7.

 

After reading your posts I think I'll just watch the increase in size for a while and see if it continues at the same rate.

 

greg

Share this post


Link to post
Share on other sites
Maarten Witberg
I think I'll just watch the increase in size for a while and see if it continues at the same rate
I am interested in your findings. please post when you have some news.

 

kjoe

smile.gif

Share this post


Link to post
Share on other sites
gwent

kjoe

 

I sure will post again to this topic when I have some news.

 

Just a curious question for anyone seeing this post. For some reason all "posts" in this topic are being displayed on my computer with the text not "wrapping". Posts in other topics appear normal i.e. wrapped to my screen size.

 

Is anyone else seeing them this way?

 

Any ideas why?

 

greg

Share this post


Link to post
Share on other sites
Maarten Witberg

is it better now?

 

kjoe

smile.gif

Share this post


Link to post
Share on other sites
gwent

kjoe,

 

It is better now, but I stll have to scroll to the right about an 1.5 inchs to see the right margin. Really strange? All other posts in other topics display normally.

 

greg

Share this post


Link to post
Share on other sites
Maarten Witberg

sometimes code is not wrapped. are you using a large font for code display?

 

kjoe

smile.gif

Share this post


Link to post
Share on other sites
gwent

kjoe,

 

Oh well, I guess it must be one of life's mysteries. I changed to View|Text|Medium and I can see the entire text boxes in this Topic.

 

If I change the settings in other Topics I see the entire Text Box and the Text changes size but I see all no matter which Text size I choose.

 

Very strange.... No problem just weird voodoo

 

greg

Share this post


Link to post
Share on other sites
This thread is quite old. Please start a new thread rather than reviving this one.

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.

Sign in to follow this  



×
×
  • Create New...

Important Information

Terms of Use