Re: gtk_text_iter_forward_search() comparison
- Date: Sun, 29 Jan 2017 10:35:10 +0100
- From: Sébastien Wilmet <swilmet@xxxxxxxxx>
- Subject: Re: gtk_text_iter_forward_search() comparison
On Sat, Jan 28, 2017 at 07:16:04PM -0500, Eric Cashon via gtk-devel-list wrote:
> I have been working on a little search experimentation. Gave writing a
> case in-sensitive gtk_text_iter_forward_search() a try. The code is
> shorter than what is in gtktextiter.c and it works a little faster. If
> a word is searched that isn't very frequent the time is about the
> same. If you just look for single chars or words that are frequent it
> looks to be quicker.
Is the performance of gtk_text_iter_forward_search() a problem for your
application? Or you just wanted to play a little with the code?
(Side note: GtkSourceView has a higher-level API for the search and
replace, with regex support. If you're working on the search and replace
for an application, this is worth a look.)
> Not sure if this a suitable method though. I know
> little of the textbuffer internals. UTF-8 gives me some trouble also.
This doesn't give us confidence in your code. Bug-free code is more
important than better performance at the cost of UTF-8-related bugs.
gtk-devel-list mailing list