Re: Slow Accessing a memo field on a network



Mike,

You should only read the Memo field once and store it to a string var. Then
do all processing on the string. You can also use _MLINE and MLINE() on
strings.

Another method is to use ALINES() and process as an Array



- Craig

"MikeA" <appell@xxxxxxxxxxxxxxxxxx> wrote in message
news:JA5Ii.7361$A72.1856@xxxxxxxxxxx
Anyone have any ideas about this: here's the situation,

I have a memo field that I use in a table and I read various lines from
the memo field for default settings. This makes it so that I don't always
have to modify the structure of the table. The total length of the
memofield is small (under 3K). However, I have to read the memo field
multiple times to get the default values on any particular line. For
example:

set memowidth to 8192
test1 = mline(mytable.mysettings, 1)
test2 = memline(mytable.mysettings, 2)
test3 = memline(mytable.mysettings, 3)
test4 = memline(mytable.mysettings, 4)

There are about 150 lines at present in the field. Here's the strange
thing. I have a method in a form that reads all the values and sets the
objects on the form accordingly. It seems like it is starting to take a
long time to load the form (around 6-10 seconds). But, this delay is ONLY
PRESENT if the table is open on another computer on the network. If I
open the table on the same computer in a separate program (such as VFP) or
I run another instance of my application, then everything is fast. The
slowness only happens if the table is open on another workstation and it
appears that it is just as slow if the table is open on 2 workstations or
10 (makes no difference). It drastically speeds up when the table is open
on only one workstation and is fast even if that table is open on one
computer with multiple programs (such as if it is open in my app as well
as open in VFP).

I have noticed this problem on both an XP Pro computer (as the server)
with XP workstations and I have also noticed this problem on a real Win
2000 server with XP workstations. I'm using VFP 6/SP3. The problem only
seems to happen when doing multiple reads from the same memofield many
times. In other words, if I do this instead:

m.lcMain = mytable.mysettings

and I then populate the form using m.lcMain then everything is very fast.
It's as if multiple reads to the same memofield is really slow but only if
the table is open on another workstation. There are no virus checkers or
other programs (that I know of) to slow it down). I can't understand why
this is happening but I'm not sure if it is happening on other server OS's
as well or just these few examples I have provided. I'm running the exe
on the local machine. But, it seems to be some kind of network issue
because the speed drastically slows down (reading the memo field multiple
times) whether the table is open on two workstations or 10. It's then
pretty much the same slow speed when open at 2 computers or more but
lightening fast when open at only one. Anyone have any ideas?

Thanks,
Mike




.



Relevant Pages

  • Re: Slow Accessing a memo field on a network
    ... I have a memo field that I use in a table and I read various lines from ... multiple times to get the default values on any particular line. ... It drastically speeds up when the table is open ... with XP workstations and I have also noticed this problem on a real Win ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Slow Accessing a memo field on a network
    ... However, I'm not understanding why with multiple reads from the same field (reading the memofield about 150 times) it's very quick but the moment the length of the field is over 500, the speed declines drastically. ... Is this a network or maybe a VFP issue where in a shared file it internally buffers up to 500 characters and if more, then rereads the data and maybe that is why things slow down? ... I played around with my memo field and I noticed that regardless of the number of lines in the memofield the slowness is due to the length of the memo field. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Memo Field
    ... Use a query as the report's or form's RecordSource. ... Function would need to copy the string ... >>Dim strNew As String, strT as String ... >>> Is there a way to force a Return in a memo field? ...
    (microsoft.public.access.forms)
  • Re: Access a specific variable in memory
    ... : KEYBOARD "test string" ... with the search argument set as my original search string, ... If I do a Control+F to search the memo field, ... What I've done is written my substring into the _CLIPBOARD. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Adding a field automatically
    ... Are you perhaps using a Memo field where you should instead be ... >and the Notes memo field is what the customer will see (all the data ... >email our customers and let them know the status of their shipments (as ... You can easily generate an Email based on a Report showing *multiple ...
    (microsoft.public.access.formscoding)