gecko-dev/netwerk/base/nsISimpleURIMutator.idl
Valentin Gosu b596ffd428 Bug 1696261 - Optimize nsDataHandler and nsSimpleURI::SetSpec to do fewer passes r=necko-reviewers,kershaw
- Rename nsAciiMask.h details:: namespace to asciimask_details so it doesn't clash with ipc/chromium/src/base/task.h
- Add SetSpecAndFilterWhitespace simple URI constructor that filters whitespace instead of just CR/LF.
- Only do one scan of the string in nsSimpleURI::SetPathQueryRefInternal in order to find the end of the path, query & ref.

There are probably more optimizations possible.
In my testing these get me a 1.5x-2x speedup.

Differential Revision: https://phabricator.services.mozilla.com/D107567
2021-04-06 08:37:40 +00:00

16 lines
536 B
Plaintext

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
interface nsIURIMutator;
[scriptable, builtinclass, uuid(e055bddd-f3c2-404b-adec-db9304e93be2)]
interface nsISimpleURIMutator : nsISupports
{
/**
* Same behaviour as nsIURISetSpec.setSpec() but filters whitespace.
*/
nsIURIMutator setSpecAndFilterWhitespace(in AUTF8String aSpec);
};