ArthurHub / ArthurHub/HTML-Renderer

Super slow performance when there are lots of "a" html tags

Đang mở
#239 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug HTML
Ngôn ngữ chính
C#
Star
1.4k
Fork
550
Merge trung bình
14 ngày 9 giờ
Pull request đã merge (30 ngày)
1

Mô tả

I am displaying an HTML, having about 200 **a** tags, the initial load and display of html is super slow.

When I modify **IsBlockAssignableToBox** function, so it does not add **a** tags, the performance issue is resolved ( and offcourse a tags are not rendered as links)

modifed **IsBlockAssignableToBox** version :

```
private static bool IsBlockAssignableToBox(CssBox box, CssBlock block)
{
bool assignable = true;
if (block.Selectors != null)
{
assignable = IsBlockAssignableToBoxWithSelector(box, block);
}
else if (box.HtmlTag.Name.Equals("a", StringComparison.OrdinalIgnoreCase) && block.Class.Equals("a", StringComparison.OrdinalIgnoreCase)
// && !box.HtmlTag.HasAttribute("href")
)
{
assignable = false;
}

if (assignable && block.Hover)
{
box.HtmlContainer.AddHoverBox(box, block);
assignable = false;
}

return assignable;
}
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.