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.
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: 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 (see section on formatted searches below).
- 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)
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: Will switching to SAP HANA solve the issues?
A: While there can be certain benefits to running HANA over MSSQL it will most likely not solve any B1UP scenarios. As mentioned above then almost all of B1UP work happen in the B1 Client without the need to talk to the server (What we call UI work). This UI Work like adding a button or moving a field around is done in the UI-API and UI-API is the shared by both MSSQL setups and HANA setups (aka they are the same), and that is the reason HANA is not the solution for at least B1UP's performance issues.
Slowness in operating SAP Business One
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.
Updated 15-05-2017: In B1UP 2017.06 (June) we have improved the performance of Item Placement Tool 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 else impact performance of the screens?
A: 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. Please see this video for more information on the matter + an example how much formatted searches slow things down
Another thing that can affect normal operation performance is what SAP version you run. If you run lower than SAP 9.2 we recommend moving to at least 9.2 as it have some new capabilities that make the impact of add-ons smaller (if they are optimized for what is called "Item Level Event Filter" (B1UP is of cause that)).
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
Please also see experimental Feature: Faster Add-on start time by not creating a DI-API Connection during startup
Common reasons for abnormal startup times
1) Many DI-API log files
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
2) Menu items issue
1. SAP note 1727485: Duplicate data entered in CDPM table causes slow loading of addon.
Solution: While creating menu by addon having UniqueID value more than 32 char, truncated value of UniqueID will store in GUID field. So every time addon creates menu, there will be a mismatch between GUID field of OCMN and UniqueID value set in CDPM again for each menu load.
2. SAP note 2125449: Logon performance issue when reports are mapped to a user-defined menu.
Workaround: Remove unnecessary report via "Administration -> Setup -> General -> Report and Layout Manager", especially for those reports which are mapped to a user-defined menu.
3. The Father field of some user-defined menus in OCMN table is null.
Normally if adding user-defined menus via UI API, the Father will be empty string instead of null.
We have prepared a corrective query for you.
By using the update query you agree with liability conditions described in the following disclaimer: http://wiki.sdn.sap.com/wiki/display/PEQ/Home
If you do not agree with the disclaimer, please contact the support organization for further processing of the reported issue.
You can run the fix on the productive database provided that:
A. You have tested the solution in a copy of the productive database and verified that the solution resolves the reported issue.
B. You make a backup of the productive database before and after the fix. Keep the backups for a reasonable time - we recommend 3-6 month after the fix.
C. No user or add-on or any other customization updating the data is connected to the database during the fix.
The select query: Get all user defined menus which's Father is null.
Select GUID from OCMN where Father is null
The update query: Update Father field to empty string.
Update OCMN set Father = '' where GUID = [%CustomMenuGUID%]
**** USE THE ABOVE QUERIES FOR THIS INCIDENT ONLY ****
How can you help me find the reason more specifically?