• 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: limits of objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: limits of objects


  • Subject: Re: limits of objects
  • From: Ben Dougall <email@hidden>
  • Date: Thu, 21 Aug 2003 13:26:21 +0100

thanks for the reply.

On Thursday, August 21, 2003, at 12:39 am, Chris Hanson wrote:

There are two separate issues here.

First, not knowing anything about AGRegex, it appears that you're asking for it to find all matches at once. Don't do that.

i believe that's the way it's intended to be used. could be wrong but i think that's the case. with regex in general, i think you've usually got the option between finding the first match or all the matches. i suppose if you've got too much text you could as you suggest iterate using find first match rather than find all. i'm just surprised that 280k of text is too much and would cause a problem when finding all.

Iterate over all of the matches instead. Your code will be much more scalable *and* you'll be able to present nice, reasonably accurate progress information while it's going on.

it's something that needs no reporting back to the user on. it all happens beneath the surface, quickly hopefully. in any case, i have decided to not use regex for pdf parsing, but i would really like to know if the limit i've roughly described seems low to more experienced programmers or if it's not that surprising - something you'd expect?

description of limit again: 280k text parsed that will probably generate about 2500 matches, that each end up looking like:

<CFArray 0x1485ca0 [0xa01303fc]>{type = mutable-small, count = 1, values = (
0 : <AGRegexMatch: 0x1474150> {
0 {0, 53} 19 0 obj
1 {0, 2} 19
2 {3, 1} 0

so that's an array, some ranges and some strings. obviously that doesn't give any description of what's occurring during the processing, but it does give the before and after.

surprising it quickly causes app to consume far too much memory, or not? am i expecting too much, basically?

thanks, ben.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: limits of objects
      • From: Michael Tsai <email@hidden>
References: 
 >Re: limits of objects (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: Drawing outside a window ?
  • Next by Date: Internet bytes transmission
  • Previous by thread: Re: limits of objects
  • Next by thread: Re: limits of objects
  • Index(es):
    • Date
    • Thread