• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Fastest/smallest search+replace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fastest/smallest search+replace


  • Subject: Re: Fastest/smallest search+replace
  • From: "Sven A. Schmidt" <email@hidden>
  • Date: Mon, 14 May 2001 19:37:56 +0200

On Montag, Mai 14, 2001, at 05:43 Uhr, Stefan Lange-Hegermann wrote:

> Now to my problem:
> I am looking for the most efficient search and replace algorithm for strings. It does not have to be
> strictly Cocoa, since I can convert my NSStrings to cstrings easily. The problem is, that I need to
> replace the \n s in a string, which is at least 150 pages long when printed out. All the attempts I tried
> are somewhat slow and I want it to be (or appear) instant.

How about breaking it up? It sounds like you want to display your string - but who'll be able to grasp 150 pages of text instantly? You might want to convert just the visible part while doing the rest in the background. Maybe you even gain some performance wrt cache.

If you don't want to display it but indicate fast processing, add a flashing button. Windows' copies are a lot faster since they have flying documents and the OSX genie effect noticably speeds up window hiding ;-)

Sven


  • Prev by Date: Re: Best way to authenticate ?..
  • Next by Date: Re: GDB question
  • Previous by thread: RE: Fastest/smallest search+replace
  • Next by thread: Re: Fastest/smallest search+replace
  • Index(es):
    • Date
    • Thread