IntellipromptMemberList issue with large number of items

SyntaxEditor for Windows Forms Forum

Posted 19 years ago by Marianne
Avatar
In attempting to display all of the ProgIDs on a system (~3500) in an IntellipromptMemberList, I'm running into an issue where it takes ~30 seconds for it to load. Here is the code I'm using. If there is a way to speed it up I'd appreciate any suggestions. Also, if it's possible to modify the performance for a large number of entries in the next version of SyntaxEditor it would be greatly appreciated as well. I even tried setting the image index to -1 but it didn't make any difference.
        public void ShowMemberList(NameValueCollection ProgIDList){
            
            IntelliPromptMemberList ml = editor.IntelliPrompt.MemberList;
            ml.Clear();

            foreach(string ProgID in ProgIDList.Keys){    
                ml.Add(new IntelliPromptMemberListItem(ProgIDList[ProgID], 0));    
            }

            ml.Show();
        }

------------------------------- Marianne

Comments (3)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
When you add items, it's going directly into the ListBox. Instead of the Add method, I'd highly recommend AddRange. Cache your items into an array before sending it over via AddRange.

Also, maybe turn the Sorted property off.

Let me know if those tips help.


Actipro Software Support

Posted 19 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
Avatar
Just a comment about this approach...

I just tried this technique on a list that contains less than 300 items, and it resulted in a big performance boost. I used to see about a 1-second delay while displaying my MemberList, and now it appears almost instantly. I thought the performance gain would be limited to extremely large lists, but it appears to benefit small lists as well. I highly recommend this approach.
Posted 19 years ago by Marianne
Avatar
Wow! That is a dramatic improvement. Takes almost no time at all (maybe a half second) for over 3500 entries. Thanks much!

------------------------------- Marianne

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.