Re: Chinese Characters
Re: Chinese Characters
- Subject: Re: Chinese Characters
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 6 Aug 2009 06:14:14 -0400
Yeah, "do shell script" isn't cheap, so that's not a total shock. AS
isn't the fastest calculator on the block, but staying in-process has
distinct advantages over forking and exec()ing another program, and
when it's getting called twice per iteration in a loop over all those
block definitions, those extra cycles add up.
OTOH, given how slow the data load is, an external program that did
the whole thing is another option - even if said program had to reread
Blocks.txt every time it's invoked to identify a character. The
per-character time might be slower, but you'd lose that whole-second
startup delay.
On 8/6/09, Simon Topliss <email@hidden> wrote:
> On 5 Aug 2009, at 22:01, I wrote:
>
>> Well, Mark, as a regular "eschewer", I look forward to comparing the
>> performance of each approach!
>
> The jury is in.
>
> Using "do shell script " dc…" takes 3.63 seconds for the first
> character (to build the UnicodeBlocks record) and 0.06 seconds
> thereafter.
>
> Using the pure AppleScript approach first takes 1.32 seconds and then
> 0.06 seconds thereafter.
>
> Nice work, though. Really appreciate your help.
>
> Simon
>
>
--
Sent from my mobile device
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden