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

limits of objects


  • Subject: limits of objects
  • From: Ben Dougall <email@hidden>
  • Date: Wed, 20 Aug 2003 23:54:05 +0100

hiyer,

i've used a regular expression framework and applied a regex pattern to an NSString. when saved as a text file, this string i'm applying the pattern to is about 280k. looking at the text, bearing in mind the pattern i'm using, i'd say they'll be about 2500 matches. a single match looks something like this when output using it's description method:

<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 a match looks like it's basically made up of a small array with a few strings and a few ranges.

when applied to the 280k text the memory (viewing in process viewer) goes up and up, then the drive start thrashing and after some time i decide to force quit, by which time my app is in red in the force quit window.

here's the code that sets up the regex and performs it:

AGRegex *regex;
regex = [[AGRegex alloc] initWithPattern:@"(\\d+) +(\\d+) +obj"];
NSArray *all = [regex findAllInString:pdfAscii];

am i doing something wrong, or am i expecting too much? i was hoping to parse far larger files than this one that's sending my computer into a spin.

i'm probably going to do what i'm trying to do above a completely different way now for other reasons, but i do find it a concern that not such a large number of objects would seem to be over a fairly small limit. i'm hoping i'm just doing something wrong. is that the case?

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: Jörn Salewski <email@hidden>
    • Re: limits of objects
      • From: Chris Hanson <email@hidden>
  • Prev by Date: Re: NSOutlineView question
  • Next by Date: Re: Simple question: Why does this work?
  • Previous by thread: Re: Simple question: Why does this work?
  • Next by thread: Re: limits of objects
  • Index(es):
    • Date
    • Thread