Home > Archive > Clarion > March 2004 > INI-files, speeding up an ancient Application
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
INI-files, speeding up an ancient Application
|
|
| Theo Kooijman 2004-03-30, 6:30 am |
| Hello there,
I have a few questions :
I'm working on an application (c55) which communicates with VB through (ugh)
INI-files. The ini-files contain lots and lots of info which are put there
by the PUTINI statement. Now this is the case, we are running this
application on a network (citrix based). We have some major performace
troubles of which these ini-files are definetely one bottle neck. We've been
discussing what to do over here and came to a conclusion like this : we have
at least 200-500 putini's in 'some' process which opens the ini file, writes
the line, closes the file. You guessed it, this is very, very time
consuming. I'm in the midst of completery redoing this idea and avoiding
INI-files but in this world of stress and lack of time i (we) need a
temporary solution. A temporary solution could be 'something' to avoid
constant openings of files and closing but to open this file once, put all
the data in it (remain file open) and at the end close the file (sort of a
stream, flush for ini-files). Anyone ever worked like this with ini-files?
Should i read them like text files and do it all 'by hand' ?
i hope someone has an idea for me
thanks in advance, Frank
| |
| Edvard Korsbęk 2004-03-30, 8:30 am |
| An Ini file only have 3 info's:
Section
name
value
Why not make an TPS file with 4 fields
ID
Section (String 255)
Name (String 255)
Value (String 255)
And update this file instead of the ini file.
When the proces is over, you write the ini file in a new process through
your inifile.tps, where you make the ini file as a standard ASCII file, and
uses ACCESS:Filename.INSERT() for each line.
PUTINI is very slow compared to even two times ACCESS:filename.INSERT()
--
Best regards
Edvard Korsbęk
+4570229998
"Theo Kooijman" <theokooijman@home.nl> skrev i en meddelelse
news:c4bipn$c1u$1@news5.tilbu1.nb.home.nl...
> Hello there,
>
> I have a few questions :
>
> I'm working on an application (c55) which communicates with VB through
(ugh)
> INI-files. The ini-files contain lots and lots of info which are put there
> by the PUTINI statement. Now this is the case, we are running this
> application on a network (citrix based). We have some major performace
> troubles of which these ini-files are definetely one bottle neck. We've
been
> discussing what to do over here and came to a conclusion like this : we
have
> at least 200-500 putini's in 'some' process which opens the ini file,
writes
> the line, closes the file. You guessed it, this is very, very time
> consuming. I'm in the midst of completery redoing this idea and avoiding
> INI-files but in this world of stress and lack of time i (we) need a
> temporary solution. A temporary solution could be 'something' to avoid
> constant openings of files and closing but to open this file once, put all
> the data in it (remain file open) and at the end close the file (sort of a
> stream, flush for ini-files). Anyone ever worked like this with ini-files?
> Should i read them like text files and do it all 'by hand' ?
>
> i hope someone has an idea for me
>
> thanks in advance, Frank
>
>
| |
| Theo Kooijman 2004-03-30, 10:30 am |
| Hello Edvard,
Thank you for your reply, i'm thinking this could be the best solution to
temporarily speed up this application.
Isnt it so that if i declare this ini-file as an ASCII file in my
dictionairy i can also apply the Stream() and Flush() commands? Hmm, nice!
This should speed this all up pretty much.
Best regards, Frank van Leeuwen
"Edvard Korsbęk" <info@bb-soft.dk> schreef in bericht
news:40696f2b$0$129$edfadb0f@dread11.news.tele.dk...
> An Ini file only have 3 info's:
> Section
> name
> value
>
> Why not make an TPS file with 4 fields
> ID
> Section (String 255)
> Name (String 255)
> Value (String 255)
> And update this file instead of the ini file.
> When the proces is over, you write the ini file in a new process through
> your inifile.tps, where you make the ini file as a standard ASCII file,
and
> uses ACCESS:Filename.INSERT() for each line.
>
> PUTINI is very slow compared to even two times ACCESS:filename.INSERT()
>
> --
> Best regards
>
> Edvard Korsbęk
> +4570229998
> "Theo Kooijman" <theokooijman@home.nl> skrev i en meddelelse
> news:c4bipn$c1u$1@news5.tilbu1.nb.home.nl...
> (ugh)
there[color=darkred]
> been
> have
> writes
all[color=darkred]
a[color=darkred]
ini-files?[color=darkred]
>
>
|
|
|
|
|