Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Displaying/buffering huge text files

by ctilmes (Vicar)
on Feb 23, 2005 at 12:20 UTC ( #433658=note: print w/replies, xml ) Need Help??

in reply to Displaying/buffering huge text files

Instead of indexing every single line, you could index a fraction of them (say every 10th or every 25th) and just skip a few lines after seeking.

If they want to see line 57, seek to line 50 using your index, and skip 7 lines after reading.

  • Comment on Re: Displaying/buffering huge text files

Replies are listed 'Best First'.
Re^2: Displaying/buffering huge text files
by spurperl (Priest) on Feb 23, 2005 at 15:57 UTC
    This is an excellent idea - I'll definitely keep it in mind. For now, it looks that full indexing is good enough, but I may stumble upon corner cases...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://433658]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2020-09-26 06:15 GMT
Find Nodes?
    Voting Booth?
    If at first I donít succeed, I Ö

    Results (141 votes). Check out past polls.