[Xapian-tickets] [Xapian] #785: Use std::string_view whenever possible
Xapian
nobody at xapian.org
Tue Jan 24 00:52:58 GMT 2023
#785: Use std::string_view whenever possible
-----------------------------+-------------------------------
Reporter: German M. Bravo | Owner: Olly Betts
Type: enhancement | Status: assigned
Priority: normal | Milestone:
Component: Other | Version:
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
-----------------------------+-------------------------------
Changes (by Olly Betts):
* status: new => assigned
Comment:
We now require C++17 for git master.
7224b8304169b9b21bbe0d613cf0963773952a87 and
4dc268bdc4df0e98f50276205f26cc5191113edb are a start to making use of
`std::string_view`, and deal with an easy gain from allowing using Omega's
HTML parser without having to copy the input into a `std::string`.
I think the key win for xapian-core is just adding an overload to the
public API and allow `TermGenerator::index_text()` to take
`std::string_view` and I'll definitely do that. There are probably gains
to be had beyond that, but somebody needs to do that work, or at least
provide evidence (rather than just belief) of gains to motivate somebody
to do the work. Literally using `std::string_view` "whenever possible" is
a lot of development work for unproved benefits and would add a lot of
additional ownership lifetimes to worry about.
--
Ticket URL: <https://trac.xapian.org/ticket/785#comment:7>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list