Gossamer Forum
Home : Products : Links 2.0 : Customization :

file size matters?

Quote Reply
file size matters?
Hi,

I now use dynamic detail-pages for my links. HTML is not a option due to some ....(too complicated to explain)

But currenly I have 800 records in my database. But with another website I have (1600) records I would alsow would like to use dynamic detail-pages. But will the script take 2 as much time to server the detail-page?

==> 800x2 = 1600 Or does the size of the database will not have such a big influence? And is there a unix command to test the 'time the script' takes? So I just install the script and then measure the (exstra) time.

Quote Reply
Re: file size matters? In reply to
Just because there are twice as many links doesn't mean the script will take twice as long to load - it doesnt work like that.

You are not serving the whole database through the script, only individual resources so it should not take much longer than normal. The process that is taking the time is searching the database for the resource to show.

Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/
Quote Reply
Re: file size matters? In reply to
I'm just curious: How long does the searching take with 800 and with 1600 links? And does the size of the recor self as any effect?

Because I thought the get_record works like this: (but please correct me if i'm wrong)

- Open database
- start reading top entry (the whole record)
- compare ID with search-Id
- IF YES: match, else go on.
..........
- end

So the number of records and the lenght of each record could have effect. Or not?




Quote Reply
Re: file size matters? In reply to
Yes, correct.

Thats why Links2 will hold varied amounts of links depending on how you use it. For example if your database has extra fields and is full of info then it will hold less resources and will be slower but a database with fewer fields could hold more links.

I don't know how long exactly searches would take with 800/1600 links but it won't be double because that would mean databases with lots of links would take ages to search if that theory was correct....

100 links = 1s
200 links = 2s
400 links = 4s
800 links = 8s
1600 links = 16s
3200 links = 32s
6400 links = 1.04min

Don't you think?

In Reply To:
- start reading top entry (the whole record)
No it doesn't search the whole resource if you use something like....

$data[$db_title];

eg, this snippet...

if ($data[$db_title] eq "Title of Resource") {
whatever();
}

....will only check the titles and not every field for every resource (I think).

Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/