• 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
speeding up list manipulations?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

speeding up list manipulations?


  • Subject: speeding up list manipulations?
  • From: Jim Johnson <email@hidden>
  • Date: Thu, 2 May 2002 18:19:56 -0400

Hi List!

I'm trying to speed up a script which will work about 1500 or so filenames at a time. The script is designed to be called from within iView MediaPro 1.4 (rel 4), and reads all the filenames in the existing iView catalog window into a list.

Currently I'm using a run handler which calls several other handlers:

on run
verifyCatalog()
creatOriginalList()
removeIllegalExtensions()
removeIllegalCharacters()
removeExcessWhitespace()
checkForDuplicatesAndIncrementAsNecessary()
end run

The filename list is compared to lists of illegal characters, file extensions, etc. inside each handler. Each of these handlers modifies the original filename list and returns a modified version of the list for the next handler to work on. I was reading with interest the "myList" vs. "a reference to" thread, but what I'm doing seems too complicated (at least to me!) to implement that particular scheme, as I'm using the list itself or the count of the list to determine my repeat loops.

As I figured out the individual handler algorithms, I strung them together to implement the full desired functionality.

Currently, I'm working on individual days at a time. Run times are reasonably fast on up to 100 files or so, but when I try to get much above that, things slow down pretty darn fast.

Questions:

1. Should I abstract the original filename list with an 'a reference to' structure before I start modifying it?

2. Should I combine the separate handlers into a unified run handler?

Any suggestions welcome (Including, but not limited to, "Buy a clue!")

THANKS in advance,

Jim.

Jim Johnson
email@hidden

ALL YOUR PIXELS ARE BELONG TO US
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Learning Apple Script
  • Next by Date: Cookies & URL Access Scripting
  • Previous by thread: Opening the root folder
  • Next by thread: Re: speeding up list manipulations?
  • Index(es):
    • Date
    • Thread