Is it .Net or is C# - No it was me

G

Graham McKechnie

Hi Guys,

Just like to thank you guys who helped me out last week and pointed me in
the right direction. I've now got the performance I was looking for. It
still is not as fast as the Palm app, but the PPC doctors will buy it. It
amazing what dumb mistakes you can make when you are learning a new
language.

Regards
Graham
 
M

Matteo Cima

Great!
And what method did you use to get the performance you need?
I am almost in the same trouble you had...

regards,
Matteo.
 
J

John T

Matteo Cima said:
Great!
And what method did you use to get the performance you need?
I am almost in the same trouble you had...

Yeah, that's pretty cruel to tease us like that. :)
 
B

BadMrFrosty

Yeah I'm looking for performance enhancing stuff for my app.

I'm sure it is probably me just being sloppy.
 
G

Graham McKechnie

Hi John,
Yeah, that's pretty cruel to tease us like that. :)

Sorry I didn't mean it to sound that way.

In the original thread someone suggested binarysearch and when I looked back
over the Palm C code, I realised I was using a binarysearch there, but I
just missed it. In the Palm stuff, I was using a table as temp storage. I
was looking at the outer loop of the code and missed the fact that I was
using the binarysearch mechanism of the database stuff. Once I saw that, it
was pretty straight forward to change from looping through the list to
binarysearching the list. That was a big speed gain.

There was also a knowledge gain too as I'd yet to use any IComparer stuff.
Incorporating an IComparer Sort class and an IComparer Find class as nested
classes in my original class was a big plus to the overall design and a
technique I know I will use many times in the future.

The other really dumb think I was doing repeatly was instantiating a form,
then going into a loop and displaying the warning form and then disposing
it. However in many of the checks the loop was never entered, so I was
instantiating/disposing for no good reason. A resource stresser would be a
better description for that type of programming.

Anyway I'm just thankful to this group for pointing me in the right
direction. Subject headings such as mine in the original thread can be
misleading to others learning the language, so I just wanted to correct that
impression.

Regards
Graham
 
G

Ginny Caughey [MVP]

I'm glad to hear you got it working, Graham. I look forward to seeing the app
one of these days.
 
G

Graham McKechnie

Hi Ginny,

Yes the app is coming together well now, the hard stuff is done, so I should
be done with it soon. Certainly the development time has been a lot shorter.
I look forward to seeing you again too - I wonder what type of conference -
sort of doubt it will be a VO one though. I think you should get on this
speaker circuit, if there is such a thing.

I've got a new interest though - GPS on these things and the Palms as well -
combined with my sporting interests if you know what I mean. If Dale really
didn't like my last subject with PDA's, then I guess he might be more
interested in this one, you too.

Regards
Graham
 
G

Ginny Caughey [MVP]

Hi Graham,

Sounds interesting. Let me (and Dale) know if you need any beta testers. <g>
 
F

FieldAdvice

Graham,

I don't mean to sound condescending or anything, but
perhaps you should try working with EVC 4.0 rather than
C#.

It's just that I notice from your process and terminology
that you work/think in a very procedural manner. Its just
my opinon, but I think C# works best with the VB/Jawa
approach, and even then, it won't ever be as fast as EVC.
I've noticed lots of C guys tying themselves in knots
working with higher level OO languages trying to write
procedural code.

MS have just released a new EVC compiler optimised for
XScale processors.

It might take a bit (well a LOT) longer to develop, but
will definately be quicker, especially for the IMDB stuff
as you can simply use pointer math as you were doing in
the palm os stuff.

rgds
k
 
G

Graham McKechnie

Hi k
I don't mean to sound condescending or anything, but
perhaps you should try working with EVC 4.0 rather than
C#.

Yes, I have already considered that. I suppose if speed really becomes an
issue, I can always do that. But I would also like to learn C# as well.
It's just that I notice from your process and terminology
that you work/think in a very procedural manner.

Interesting comment - care to expand why you think that. I'm always
interested to learn.
It might take a bit (well a LOT) longer to develop, but
will definately be quicker, especially for the IMDB stuff
as you can simply use pointer math as you were doing in
the palm os stuff.

I'll take a look.

Regards
Graham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top