[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev can't interrupt "LIST" command

From: Klaus Weide
Subject: Re: lynx-dev can't interrupt "LIST" command
Date: Fri, 31 Dec 1999 07:59:26 -0600 (CST)

On Fri, 31 Dec 1999, Leonid Pauzner wrote:
> 30-Dec-99 19:25 Klaus Weide wrote:
> >      (74 - 51) / (12 - 7) = 4.6
> >    but the input numbers are only very approximate.
> But overhead really large anyway.

But that is a very relative statement.

> Do we store highlighted text duplicated?

Yes.  HText_trimHightext():

         *  Copy the link name into the data structure.
        if (line_ptr->data &&
            anchor_ptr->extent > 0 && anchor_ptr->line_pos >= 0) {

> Do we store a list of URLs in HText, rather than a list of pointers?

HText holds a HTList of TextAnchors, each TextAnchor (for a normal link)
has a pointer to a HTChildAnchor which has a HTLink which points to a
HTAnchor which may be either a HTChildAnchor (which in turn points to
a HTParentAnchor) or a HTParentAnchor, the HTParentAnchor owns the string
for the full URL.  There should in general only be one copy of the URL
address string itself (as long as it isn't used otherwise, including
by being in the currently visible screenful), which is shared if multiple
links point to the same URL.

Assuming that each link points to a different URL (and no fragments),
some of the fixed overhead for each link is

   sizeof(TextAnchor)       # directly linked
   + sizeof(HTList)         # linkage among HTChildAnchors
   + sizeof(HTChildAnchor)  # child of the HTParentAnchor containing link
   + sizeof(HTList)         # target anchor's sources list
   + sizeof(HTParentAnchor) # target anchor
   + sizeof(HTList)         # HTParentAnchors are kept in lists, too
 ( + whatever I overlooked )

add to that strlen(hightext)+1  # assuming link text fits on one line
add to that strlen(URL)+1       # in target anchor's address field

and we still haven't taken account of the data in the HTLines at all,
which include more fixed overhead and another copy of hightext.  You
do the math if you find the topic that interesting... :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]