• 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
Strange Interaction with Swift and the Time Profiler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange Interaction with Swift and the Time Profiler


  • Subject: Strange Interaction with Swift and the Time Profiler
  • From: Thomas Wetmore <email@hidden>
  • Date: Sun, 13 Jul 2014 11:03:51 -0400

I have just had a fascinating experience with a pure Swift test program and the Time Profiler instrument.

I ported a library to Swift for handling GEDCOM files (genealogical data). After getting it working with a test program on simple test files, I am now running it on a more substantial file, my own master genealogy file with 21,000 records.

The time performance on the small files was fine, but on the substantial file performance was abysmal. I have not yet let the test program run all the way through as the speed of indexing, etc., is constantly slowing down, seemingly approaching an asymptote of zero! Interestingly memory use does not grow beyond that needed for the original parsing of the file. So some parts seemed good.

The next step was to hook up the Time Profiler instrument and start drilling down to the major issues.

Now the interesting part. When running the test program under the Time Profiler, it runs lickity-split, and most importantly, correctly, at about the speeds I would expect it to do before any fine tuning. Under the Time Profiler the test program runs in about a minute. Running the program includes a fairly sophisticated graph theoretic algorithm (Tarjan's algorithm for strongly connected components) to find any "I am my own grandpa" ancestry cycles in the data; the algorithm runs a depth-first recursive sweep of the entire graph.

There is no real question here, though if anyone could shed any light on what might be going on it would be nice to know. My expectation is that my code is simply falling into some weird beta rat hole, and the next beta may fix it. It was disconcerting that the tool designed to find the time performance problems magically made mine disappear.

Tom Wetmore, Chief Bottle Washer, DeadEnds Software
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Strange Interaction with Swift and the Time Profiler
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Schemes not being preserved
  • Next by Date: Re: Xcode 6beta3, Swift, UITableView and auto complete
  • Previous by thread: Re: Schemes not being preserved
  • Next by thread: Re: Strange Interaction with Swift and the Time Profiler
  • Index(es):
    • Date
    • Thread