Q: I think B1UP is slow! Have you guys written poorly code that cause this?
A: Certainly not. One of our highest goals is performance in the product and huge amount of hours goes into performance tuning every single month. That being said, the highly dynamic nature of B1UP will have an impact on performance and it will never be able as performance effective as a highly specific add-on. Also we can never be faster then the underlying SAP SDK (Example: No matter how little we want, we need to do a DI-API connection and that is 100% controlled by the underlying layer and take 3-6 seconds that we cannot optimize on).
Q: So does that mean B1UP will never be faster?
A: No, We always find ways to do something fast, cache data and we of cause also from time to time make mistakes that need to be fixed in regards to performance. similarly as SAP release new versions of the SDK, new features that increase performance comes along that we begin to use. For that reason, being on latest B1UP and SAP Version normally tend to give you the best performance we can offer.
Q: What about hardware. Any recomendations?
A: As B1UP is a SAP Client tool and cache most of its data the most important hardware is the client machines and less so for the server. During startup of the product the server is asked for all configuration-data for B1UP so during startup the server and the network is the most important, but in day to day work most work lies in the client machines memory and CPU (Server traffic of cause exist but are kept to a minimum). Also the nature of how SAP Add-ons work in general you will experience that you will get most performance out of multi-core machines as SAP and B1UP are two separate process running that does a lot of context switching (and if you only have a single core the CPU need to constantly load/unload the two)
Q: When I start B1UP it takes a long time before it is ready to use?
A: Before we talk about performance let us quickly have a look of the things that happen during a startup so we can talk from there. A startup include:
- 1. Connection to the UI-API.
- 2. Creation of menuitems.
- 3. Connection to the DI-API.
- 4. Check that all userdefined tables and fields are there.
- 5. Retrieve all data for the various configs.
- 6. Apply the configs that need to be run during startup (Exchange Rates, B1 Search, Add and Edit Menus etc.).
- 7. License check.
Lets look at each step:
- This step only take a few milliseconds
- About a second goes to do this. We are currently looking into alternative ways to make this faster
- This is about 33% of the connection time and is a direct call to the DI-API so only SAP can optimize this part. The issue is especially bad if you use VPN Connections.
- This step is highly optimized for B1UP and will only take time the very first time you activate B1UP on a machine
- This take 33% of the connection time. We are constantly optimizing our strategies on how to retrieve the data in the fastest way. The more configs and modules you have, the longer it will take to get the data so make sure you do not have any unnecessary modules and/or configs in the system.
- Exchange Rates and Add and Edit Menus takes the most time here. Exchange was in 4.x optimized to only check if it is actually needed and we are working on ways to improve setups that have many new menuitems from Add and Edit Menus.
- This step happen after startup and does not impact startup time
To decrease the time it takes to start B1UP in some cases, please see this article on SAP Support launchpad: https://launchpad.support.sap.com/#/notes/2113913
The log files in question can be found from %USERPROFILE%\AppData\Local\SAP\SAP Business One\Log\DIAPI
You can also stop the DI-API from creating the log files by editing the file: C:\Program Files (x86)\SAP\SAP Business One DI API\Conf\b1LogConfig.xml
Q: I've applied a lot of changes to a SAP screen using Item Placement Tool and/or Content Creator and now the window is slow to open. What is wrong?
A: This is one of the known performance bottlenecks in the SAP SDK. Changing the existing layout of a SAP screen is not something that is done as a one time deal. Every time you open the screen, the changes are applied just before the screen is opened and the more changes you have, the more time it will of cause take to do so. As this was a major issue for many customers we in B1UP 4.x introduced what is called XML-mode that add the data to the screen as a bacth job instead of one item at the time and this have reduce the time significantly, so if you are on SAP 8.8 or higher it is recommended to use B1UP 4.x or higher and use the XML mode. Also please see the mention on Formatted Searches below.
Updated 15-05-2017 - In B1UP 2017.06 (June) we have improved the performance when working with system items (Move/hide). They are now also updated using XML and this increase the performance when modifying many system items.
Q: What other things can affect performance:
A: We have identified the following
- One thing we often see slow down add-ons are heavy usage of formatted searches... Opening a window with many formatted searches and an add-on running is unfortunately a bad combination and internally we try to keep formatted searches to a minimum (in a test-database you could try to remove all formatted searches on a given window and see the difference). Problem is that Formatted Searches cause a lot of Validate events (events going out of fields) and often people create B1 Validation configurations that use Validate events. If you open a SAP screen with no B1UP or Formatted Searches you roughly get 11 Events from the screen. If you however apply a large number of Formatted Searches to the screen we have seen from some customers that the formatted searches generate a huge number of Validate events (as much as 300!). Given that a B1 Validation Configuration will not be able to tell the difference between a Formatted Search giving the validate event and a user doing it, we have no choice not to test the event and that cause a lot of processing time. Many of our partners have successfully reduced SAP screen load time by eliminating Formatted Searches and replacing them with the various B1UP techniques to accomplish the same result.
Q: So how can I test if B1UP is the issue?
A: This is not an easy task but please try the following things:
- Try to stop B1UP and test the performance. In such a case you will in 99% of the time experience that things are faster (More features will always decrease performance) but if you do not get any better performance we now know that B1UP is not the issue
- Try to turn B1UP modules of one at the time in order to test which of the modules are taking the performance
- Try on a copy of the database to removed all Formatted Search on the screen to test and see the difference.
- Try to do the test on the server (That way you eliminate any possible issue in network).
- Try to monitor the SQL-server if it is the bottleneck (Long SQL Waits)
- Try to monitor the client CPU/Memory and see if that is the bottleneck (Spikes in CPU usages / All memory is used causing pageing of the memory)