Board index » delphi » Database Tables vs. StringLists and Text Files

Database Tables vs. StringLists and Text Files

1. This is a question that I should have asked long before...

I have built an application that uses StringLists instead of tables, and
saves all info into a plain text file (which is being encrypted, but that's
another story). This file is being kept in memory as a large TStringList. I
just read portions of it on a "need to know basis". Otherwise, this app
should have been a plain database app.

My problem is that at times the app slows down quite a lot (under "normal"
conditions of data volume; anyway, when I wrote the code I did my own
testing with sample data which indeed wasn't high volume...). I tried to
destroy all of the TStringLists every time I don't need them.

Now, based on what I told you here and on your experience, please tell me
your opinion.
The big question is: Does this happen because I did not use the database
engine and I manipulate (too many) strings and string lists?

2. What's the big difference between these two ways of closing down the app:
          A. MainForm.Close
          B. Application.Terminate?

Thank you for your attention,

Dan

 

Re:Database Tables vs. StringLists and Text Files


Close is the best way to closing the app.
This is because the OnCloseQuery and OnClose events gets called when you use
Close.
These events do not get called when using Application.Terminate.

Dan S. <m...@karabus.deletethis.com> skrev i en
nyhedsmeddelelse:wI1L3.180553$5r2.343...@tor-nn1.netcom.ca...

Quote
> 2. What's the big difference between these two ways of closing down the
app:
>           A. MainForm.Close
>           B. Application.Terminate?

Other Threads