mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
LibWeb: Don't try to ad-block data: urls
In some cases these can be several KiB or more in size, making checking very slow, and it doesn't make sense to filter them out anyway. This change speeds up loading pages with large data: urls, which previously took up to 1ms per byte to process.
This commit is contained in:
parent
a79bdd2bd5
commit
d36e3af7be
1 changed files with 3 additions and 0 deletions
|
@ -25,6 +25,9 @@ ContentFilter::~ContentFilter()
|
|||
|
||||
bool ContentFilter::is_filtered(const AK::URL& url) const
|
||||
{
|
||||
if (url.protocol() == "data")
|
||||
return false;
|
||||
|
||||
auto url_string = url.to_string();
|
||||
|
||||
for (auto& pattern : m_patterns) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue