« Determining Purgeable Elements | Main | Cloud Mobile, Extensible Storage Data Use in Schedules »

March 19, 2013

Comments

What is the cost of not optimizing for speed?
What is the cost of your work?

I'm a bit sceptical that the (> 100) check will always be a valid approach for future Revit versions. A more robust approach may be to combine a try loop with intelligence as to what parameter types have previously been tried and caused the exception i.e. at run time you store parameter types that have caused an exception to a collection and then query that for the current parameter type before inspecting it's DUT. Therefore if you are testing 100 things of the same parameter type then you only cause an exception once (although 100 exceptions might be quicker than looking through a list of integers 100 times).

I've read that the problem in general with extensions to objects you don't control is that they stop working when the people that do own the objects add methods to them with similar signatures. I imagine the easy way around this would be to ensure that the argument signature to the extension is one that can't be inherently duplicated, say if it contained a required input argument of an object type found only within the extensions class itself. The more convenient these extensions are the more you use them and thus the more of a nightmare it becomes when Autodesk add a method to one of their classes that duplicates the signature of your existing extension. You'll obviously only get the error at runtime and you may not get the error at all because the duplicated method may return acceptable results for some random situations.

Dear Mr One Two,

I like your moniker :-)

I also like your scepticism and careful forward thinking.

Thank you very much for two very valid suggestions!

Furthermore, looking through a list of integers can be speeded up by converting it to a dictionary.

Cheers, Jeremy.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)

Jeremy Tammik

AboutTopicsIndexSource