|
Blogs
Performance issues can occur with DI Objects and symptoms include Long Processing Time or an eventual crash. In this blog we will highlight some steps that can be taken and tools you can utilise to help you identify the performance issue. 1. Test without the Add-on runningWhile it seems like a simple thing to do testing the same functionality in Business One is an important step. While the performance issue might occur in your add-on it may also occur in Business One pointing to the fact that it is a core performance issue and not an DI performance issue. 2. Check if there is a memory leakThe Task Manager is the easiest way to detect if there is a memory leak. a. Create a small sample to replicate the scenario. b. Open the Task Manager and choose the Performance tab. c. Run your sample and monitor the CPU Usage and the Page File Usage in the Task Manager.
When starting the Add-on:
When ending the Add-on:
3. Check if there is a problem with a queryAnother cause for a DI Performance issue might be that a query triggered by the Add-on takes quite a while to run. We can use the SQL Profiler to verify if this is the cause. a. Create a small sample to replicate the scenario. b. Open the SQL profiler (Start -> All Programs -> Microsoft SQL Server 2005 -> Performance Tools -> SQL Server Profiler). c. Select File -> New Trace and connect to the SQL Server if prompted. Provide the Trace file a Trace name. d. Click on the Events Selection tab. Select the checkbox "Show all columns". e. Click Column Filters and the Edit Filter window will open. In this window you can assign the DatabaseName, LoginName or other filters to narrow down the results returned. f. Just before running your Add-on click Run and then run your Add-on. g. Save your trace file.
Open the trace file and the three columns to analyse are:
The parameters we will look at include the duration of each query - 105020 is about 1.75 mins and would be indicative of an issue. The number of SQL queries generated can also indicate an issue - if an unacceptable number of queries are generated eg 80000 then it may be the reason.
4. SAP Business One Test ToolsThe SAP Business One Test Environment is a set of software tools that help profiling the execution of a solution. They are available to download on the SDN and you can download the latest version of the B1TE from https://www.sdn.sap.com/irj/sdn/businessone?rid=/webcontent/uuid/cbb70163-0c01-0010-9b8c-f6ee72de7328 DI Logs ReaderStarting on SAP Business One 2007A version the DI API is able to generate log files tracing all calls made from an add-on to the DI API. The B1DILogsReader is then able to open the DI API logs files and show the information in a very easy way to read. Some of the information recorded is:
.Net ProfilerThis tool keeps track of all the DI API and UI API methods called from a .NET add-on. The tool produces information about the time spent, the exception raised, and possible compatibility problems. For each call, the following information is collected:
If you do suspect there is a memory leak in the DI we would recommend that you log a support message providing the exact scenario, the results and a small sample to reproduce and verify the issue.
Our next blog will cover some DTW Top tips so catch you then :-) Lisa Mulchinock is a senior SDK support consultant for SAP Business One. Add to: del.icio.us | Digg | Reddit
|