Jump to content
Salesforce and other SMB Solutions are coming soon. ×

File Compacting


gwent

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use