• 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: Importing/parsing CSV files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Importing/parsing CSV files


  • Subject: Re: Importing/parsing CSV files
  • From: T&B <email@hidden>
  • Date: Wed, 13 Sep 2006 13:09:22 +1000

Following up, here are some more accurate speed measurements:

37 column x 324 row CSV file, all values in quotes:

Time   Method/script
4.6s   Tom's character by character (posted earlier)
2.3s   Tom's delimiter parsing (linefeed, comma, then quotes)
0.75s  Kai's delimiter parsing and temp ASCII 0, 1, 2 substitution

19 column x 2323 row CSV file, about 10% of values in quotes:

Time   Method/script
60s    Tom's character by character (posted earlier)
22s    Tom's delimiter parsing (linefeed, comma, then quotes)
0.65s  Kai's delimiter parsing and temp ASCII 0, 1, 2 substitution

So the speed really in phenomenal, and negates the need for me to call an external perl or python or C routine for the CSV parsing, whoohoo!

It verifies my early theory:

It seems to me that the power of AppleScript's text item delimiters is more than up to the task.

but executes a solution much faster than I had yet managed. Is the speed due to the use of a list property in a script object within the handler? Why is that so much faster?

Now I'm wondering what other AppleScript handlers I have could benefit from a similar approach.

Thanks,
Tom
T&B


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Importing/parsing CSV files
      • From: kai <email@hidden>
References: 
 >Re: Importing/parsing CSV files (From: T&B <email@hidden>)
 >Re: Importing/parsing CSV files (From: kai <email@hidden>)
 >Re: Importing/parsing CSV files (From: T&B <email@hidden>)

  • Prev by Date: Re: Importing/parsing CSV files
  • Next by Date: Re: Filemaker Pro 8 question
  • Previous by thread: Re: Importing/parsing CSV files
  • Next by thread: Re: Importing/parsing CSV files
  • Index(es):
    • Date
    • Thread