[comp.databases] 4th version 2 trouble

t31848e@puukko.hut.fi (Teemu Einari Puskala) (02/28/90)

I made a reporting system on the 4th dimension version 1. The amount of
data grew to abount 4 Mb and the system became too slow, so I decided
to upgrade to version 2 (up to 40 times faster they said).

So I converted my program with the conversion program that came with
the new version. Here is where the trouble strated:

   1. The converted program had syntax errors, even though the original
      program had been tested and tried for months and had no syntax errors.
      How do I know that there is no other kinds of errors caused by
      the converter ? Do I have to go trough all the code (there is a
      substancial amount of it) ?

   2. The new version of the program didn't run any faster than the old one. 
      Could this be a problem in my programming style, that fits well for
      version 1 but not 2 ? I can't find any other explanation. 

I didn't upgrade yet, since the system eith version 1 is reliable and
works well, as it looks now moving up to v 2 brings more trouble than benefit.
Any of you out there had the same problem ?

- Teemu Puskala
- Helsinki University of Technology
- email pte@niksula.hut.fi
= Teemu Puskala                      = Don't believe in miracles --
= Helsinki University of Technology  =    rely on them.
= Email to : t31848e@puukko.hut.fi   =
= UUCP mcvax!santra!puukko!t31848e   =

liemandt@lindy.Stanford.EDU (Joe Liemandt) (03/01/90)

In article <1990Feb28.102816.15192@santra.uucp> t31848e@puukko.hut.fi (Teemu Einari Puskala) writes:
>I made a reporting system on the 4th dimension version 1. The amount of
>data grew to abount 4 Mb and the system became too slow, so I decided
>to upgrade to version 2 (up to 40 times faster they said).
>
>So I converted my program with the conversion program that came with
>the new version. Here is where the trouble strated:
>
>   1. The converted program had syntax errors, even though the original
>      program had been tested and tried for months and had no syntax errors.
>      How do I know that there is no other kinds of errors caused by
>      the converter ? Do I have to go trough all the code (there is a
>      substancial amount of it) ?

The problem is probably not with the convert program.  4D 1.0 was very
lax in its parsing.  If you left out parens or quotes, the program
just continued executing without an error message.  4D 2.0 is much
more strict. So, code that executed under 1.0 might not work with 2.0.

I have not had problems with the convert program, except that you
should run 4D tools to compact the database before you do a conversion.


>   2. The new version of the program didn't run any faster than the old one. 
>      Could this be a problem in my programming style, that fits well for
>      version 1 but not 2 ? I can't find any other explanation. 

Different parts of 4D will show different speed increases.  In
general, all disk i/o is much faster.  Interpreting is not.  They are
close to releasing a compiler which should speed up the execution of
code. 
So, it is conceivable that you program is not faster.  You can get
increases in speed relatively easily by replacing some 1.0 stuff with
new 2.0 commands.  Replace 1.0 "arrays" with real 2.0 arrays. Use for
loops instead of while loops. Use print selection instead of print
layout. Use scripts instead of long layout procedures.


>I didn't upgrade yet, since the system eith version 1 is reliable and
>works well, as it looks now moving up to v 2 brings more trouble than benefit.
>Any of you out there had the same problem ?

If the system works, stick with it.  If you want to move to 2.0, think
about re-building from scratch.  It should not take too long, even for
a relatively large system. 


>- Teemu Puskala
>- Helsinki University of Technology
>- email pte@niksula.hut.fi
>= Teemu Puskala                      = Don't believe in miracles --
>= Helsinki University of Technology  =    rely on them.
>= Email to : t31848e@puukko.hut.fi   =
>= UUCP mcvax!santra!puukko!t31848e   =


Joe Liemandt
Stanford University
liemandt@lindy.stanford.edu