I've also noted some slowness, but as I said, in the past I couldn't directly attribute it to my code. I'll have to retest, but I think part of the problem too (at least on my side), may have something to do with a combination of all of the following happening in short order;
a. sending a command from a frontend that
b. uses a batfile that
c. launches my app (hmm.... maybe I should let is stay open in the background all the time)
d. which then checks the commandline parameter against an ini, as well as
e. reads several configuration settings and then;
f. passes stuff to the clipboard which is then
g. polled and executed by the led-wiz.
h. my app then quits
i. command is relenquished to the bat file
j. mame is then launched.
As you can see, there are a number of things happening in that short period. Some of which are out of my control. HOWEVER, I've been intending to spend some time doing things like;
1. reading and storing the config entries in memory after the first time they're accessed.
2. providing more internal options for skipping needless functions based on the specific use.
3. more testing of various individual functions for speed bottlenecks, cutting third party apps out of the picture to get a clearer picture of any problems .
4. setting swiftled to run in the background.... there may some slowdown due to focus issues.
5. Switching to asynchronous coding. Right now my code is running synchronously, it executes a command and waits for a response before continuing on. Those responses happen almost instantaneously, but all together probably add up. In a number of cases, I probably don't need responses before continuing on.
Other than those issues, I can tell you my code's pretty clean, but it COULD use some optimization. There's a lot of functions that could be consolidated, and I'm always thinking how to streamline it. While going to sleep I usually come up with some good shortcuts. On a whole though it's good enough for me, for now, and that's the only reason I built it to begin with. Since I use this app all the time myself, you can bet on the fact that I'll continue making it better when I get the chance.