Author Topic: SelectionFilterBuilder  (Read 9095 times)

0 Members and 1 Guest are viewing this topic.

Bryco

  • Water Moccasin
  • Posts: 1882
Re: SelectionFilterBuilder
« Reply #15 on: January 11, 2010, 06:44:49 PM »
That's the one I compared it to. I guess a collection is in inherently slower as it adds indexing.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8661
  • AKA Daniel
Re: SelectionFilterBuilder
« Reply #16 on: January 11, 2010, 07:47:45 PM »
I had changed your inner loop, I just wondered if it made a difference

Bryco

  • Water Moccasin
  • Posts: 1882
Re: SelectionFilterBuilder
« Reply #17 on: January 12, 2010, 09:56:30 AM »
SelectionSet count w/ 2 types  = 44 time=2880
using this filter filter = new TypedValue[] { new TypedValue(0, "Line,Arc,Circle,ellipse"), new TypedValue(8, "0") };
Objectid count w/ 2 types selectall = 44 time=10740
using "Line,Arc,Circle,ellipse" and then selectall as  I wrote then checking  for layer 0
Objectid count w/ 2 types selectall2 = 44 time=10940
using "Line,Arc,Circle,ellipse" and then selectall as  Daniel wrote then checking  for layer 0
dictionary = 44 time=7900   Daniel's dictioary
dictionary = 44 time=7940  xsfhlzh's Linq

There are almost 90000 entities in the dwg.

Daniel your version looks like it would do better but it still must go through the same amount of steps