Article View: comp.lang.basic.visual
Article #296Re: is this too much to handle for VB ?
From: Brian Klausen
Date: Tue, 28 Dec 1999 00:00
Date: Tue, 28 Dec 1999 00:00
25 lines
2328 bytes
2328 bytes
> Maybe this is not the most elegant solution, but for a quick and > dirty approach I'd do the following - > > 1. A time opens the file every, say few seconds (depending on > the frequency with which the file is changed) and checks the > exact file size, marks it as well as the number of lines in the > file - have to run through it once, sorry. It's a sequential file > anyway, so there's not much to do about it. > 2. If the file size is bigger than the last time, read the file up > to the old number of lines and then line input the rest of the > file Your idea is basicly good enough as I see it, but there's something I don't quite understand. Why not just settle with opening every hour, or which ever is needed, note the size of the file, and then the next time you have to read from the file, skip to the previously noted size, and then line input the rest. What would you want with the initial number of lines? I suppose you could read the number of line breaks in the file, but compared to skipping to a exact byte, it's way to slow IMO. Obviously, the first time the program runs, it has to read the whole file, but that's the least of the problems. Kind regards Brian Klausen
Technical Details
Message-ID:
<84a4c4$bjf$1@news1.tele.dk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<g5S94.514$iq6.800@news.get2net.dk> <849s75$eg6$1@pollux.ip-plus.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f51ba,a47ce68fa8298b9d X-Google-Attributes: gidf51ba,public X-Google-Thread: 110e3b,a47ce68fa8298b9d X-Google-Attributes: gid110e3b,public X-Google-Thread: fb992,a47ce68fa8298b9d X-Google-Attributes: gidfb992,public X-Google-Thread: f5f6f,a47ce68fa8298b9d X-Google-Attributes: gidf5f6f,public X-Google-Thread: f645d,a47ce68fa8298b9d X-Google-Attributes: gidf645d,public X-Google-Thread: 101986,a47ce68fa8298b9d X-Google-Attributes: gid101986,public From: "Brian Klausen" <brian@nospam.frontend.dk> Subject: Re: is this too much to handle for VB ? Date: 1999/12/28 Message-ID: <84a4c4$bjf$1@news1.tele.dk> X-Deja-AN: 565617642 References: <g5S94.514$iq6.800@news.get2net.dk> <849s75$eg6$1@pollux.ip-plus.net> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Organization: Customer at Tele Danmark Erhverv X-MSMail-Priority: Normal Newsgroups: comp.lang.basic.visual,comp.lang.basic.visual.3rdparty,comp.lang.basic.visual.misc,comp.lang.visual.basic,dk.edb.programmering.basic.visual-basic,microsoft.public.vb