Oh, the weather outside is frightful
So I’ll stay in and play with Silverlight…
ahem…
Anyway, results from next experiment were a bit discouraging. I took the last experiment, and instead of just a single ball, made an array and 100 balls. Scaled them way down and gave them random velocities to start out with, removed the gravity. Here’s the result:
https://www.bit-101.com/silverlight/msm02/TestPage.html
Now, whereas the last one ran smoother on my Mac than on the PC where it was developed, this one runs fairly decently on the PC, but reeeeeeally slow on the Mac. What’s more, it pretty much maxes out both CPUs on my Mac Book Pro, while the PC’s single CPU averaged around 50%. Note, this is a rather low end, older PC, an AMD Turion 1.8 GHz CPU, with less than 1 GB of RAM. By all accounts, the Mac Book Pro should blow it out of the water. Could it be that Silverlight works better on Windows???
I’d be interested to hear comparative results from other users. The particles should shoot out pretty fast and most should hit the edges in just about one second. On my Mac, it takes at least 3-4 seconds til they hit, and it’s very jumpy. Odd.
[Update]
I noticed one process syslogd running on the Mac whenever I ran the file. It was taking a bunch of CPU time. I realized that I had left a System.console.Write() command in the file, so it was apparently trying to log something a whole lot. I removed that and the CPU hit on the Mac is way less, but still about 50% on both CPUs and waaaaay slower than the PC.
It could still be that I’m doing something wrong. If any Silverlight gurus want to check out the code, just ask.