Answered by:
How do I decrease load times on an ASP page inserted into ISV

Question
-
I've run into a situation where my custom ASP.net page is loading at an unreasonable slow pace, and am looking for some guidance as to how to speed it up. The page itself is designed to be an easier to work with Many-to-Many relationship interface. Instead of having to use the lookup box to add an entity relationship, the page provides a series of check boxes which the user can check to link the entities. Here is how the code functions:
1) Upon the page load, the first thing the page does is query the CRM service to get a list of all of the possible related entity types. These values are then stored in a List of the specific business entity type.
2) second, still during the page load, the page does a query for all of the related entities which are linked to the primary record. THese are also stored in a list.
3) Third, the page creates a CheckListBox for all of the items in the list obtained in step one. If the item is also in the list produced in step 2, the page checks the particular check box. If the item is not related, the box is left unchecked.
4) there is an event added to the CheckBoxList, which will associate the primary record with the related record if the checkbox is checked, and dissociate the related entity if the box is unchecked.
The real issue comes in when I insert the asp page into the record. When I load the page in visual studio, it will take 2 seconds at the longest. When I have it embedded in the CRM record, it takes 30 seconds at the shortest. Also, there are no iframes which have been inserted into the primary record.
If any one has any suggestion as to how to reduce the load times, please let me know.
Monday, September 13, 2010 3:57 PM
Answers
-
Hi Dan,
What I try to do in situations like this is to determine what routines are the slowest and/or are being called the most (AKA "Profiling"). If you don't own a code profiling tool then the next best step is to add trace.write statements with date/time stamps. Either direct the trace output to a file or use the Debug View sysinternals tool to view the output in real-time. With that information you'll be able to determine the largest time gaps between methods.
-Tim
Altriva Solutions
- Proposed as answer by DavidBerryMVP, Moderator Friday, October 1, 2010 6:11 PM
- Marked as answer by DavidBerryMVP, Moderator Friday, November 5, 2010 10:02 PM
Monday, September 13, 2010 5:16 PM
All replies
-
Hi Dan,
What I try to do in situations like this is to determine what routines are the slowest and/or are being called the most (AKA "Profiling"). If you don't own a code profiling tool then the next best step is to add trace.write statements with date/time stamps. Either direct the trace output to a file or use the Debug View sysinternals tool to view the output in real-time. With that information you'll be able to determine the largest time gaps between methods.
-Tim
Altriva Solutions
- Proposed as answer by DavidBerryMVP, Moderator Friday, October 1, 2010 6:11 PM
- Marked as answer by DavidBerryMVP, Moderator Friday, November 5, 2010 10:02 PM
Monday, September 13, 2010 5:16 PM -
Our issue was that users (sales consultants) were making quotes over the phone therefore they were unable to add products one by one (the way CRM works). I added lookups on quote entity and used Service.Create() (javascript) for creating quotedetails and it is working like a flash.
Regards
FF
Monday, September 13, 2010 6:01 PM -
I've done a little testing, and the issue does not appear to be related to my code, but to how the iframes are being process. Does anyone know if there are any web.config settings that I may want to look at?
Friday, October 1, 2010 1:23 PM -
Perhaps if you could outline what you discovered about the processing for Iframes, we could understand more about what the nature of the problem is. There may be an unavoidable behavior related to the way CRM forms load pages into the Iframe, or how you're loading your ISV page within it.
Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.comFriday, October 1, 2010 6:12 PMModerator