[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev optimization Re: internal links (patch11)
From: |
Leonid Pauzner |
Subject: |
Re: lynx-dev optimization Re: internal links (patch11) |
Date: |
Tue, 5 Nov 2002 03:49:23 +0300 (MSK) |
5-Nov-2002 02:09 I wrote:
> * optimization for parsing html with many relative links, href="#fragment" -
> HTAnchor_findChildAndLink() and HTML_start_element(), case HTML_A:
> now avoid significant overhead when link == LINK_INTERNAL (e.g. resolving
followup:
--- htanchor.c Tue Nov 5 01:51:36 2002
+++ htanchor.new Tue Nov 5 03:27:52 2002
@@ -264,7 +264,7 @@ PUBLIC HTChildAnchor * HTAnchor_findChil
DocAddress parsed_doc;
HTParentAnchor * dest;
- if (ltype == LINK_INTERNAL) {
+ if (*href == '#' && ltype == LINK_INTERNAL) {
dest = parent;
fragment = href+1;
} else {
--- html.c Mon Nov 4 22:55:26 2002
+++ html.new Tue Nov 5 03:40:58 2002
@@ -3034,6 +3034,8 @@ PRIVATE int HTML_start_element ARGS6(
StrAllocCopy(href, value[HTML_A_HREF]);
if (href && *href)
TRANSLATE_AND_UNESCAPE_TO_STD(&href);
+ if (!href || !*href)
+ StrAllocCopy(href, "#"); /*extreme case*/
} else {
/*
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
- lynx-dev more memory optimizations (patch10), Leonid Pauzner, 2002/11/03
- Re: lynx-dev more memory optimizations (patch10), Thomas Dickey, 2002/11/03
- Re: lynx-dev optimization Re: internal links (patch11),
Leonid Pauzner <=
- Re: lynx-dev optimization Re: internal links (patch11), Philip Webb, 2002/11/04
- Re: lynx-dev optimization Re: internal links (patch11), Stef Caunter, 2002/11/04
- Re: lynx-dev optimization Re: internal links (patch11), Frédéric L . W . Meunier, 2002/11/05
- Re: lynx-dev optimization Re: internal links (patch11), Philip Webb, 2002/11/05
Re: lynx-dev more memory optimizations (patch10), Leonid Pauzner, 2002/11/04