Optimierte Bearbeitung und Performance

Revised edition in JTL-Wawi 1.4

We continue our developer diaries for project 2.0 of JTL-Wawi 1.4, this time focusing on the output. To this end, we are currently turning a whole series of documents in the ERP upside down to make them readable for other systems in the future, as well as improving performance and the ability to edit templates. We explain more about this below.

Templates - what is that?

Our ERP system includes templates for all business documents used, such as listings, invoices and delivery bills. The templates can be customized to suit your own business or created for specific customer groups. You can also specify who should receive what and in what form. Should the customer receive the invoice by email or only in printed form? We have template management for this. You can find out more in our guide:

Manage templates in JTL-Wawi

The starting point

Anyone who uses our templates for high shipping volumes or who relies on particularly fast action in day-to-day business may have noticed that the output encounters performance problems in these cases. The cause: The current output works with variables that retrieve data individually from the database. To do this, lots of queries are sent to the server, all of which require a certain amount of time for the dialog with the server. Depending on the template, well over 100 SQL queries can be sent. For example, a delivery bill with around 200 items may suddenly generate 3,500 SQL queries. It is hardly surprising that this affects performance, but it is also not ideal, especially as it can lead to further errors.

Even simple changes to the templates are not always easy to make – some customers have to call in a service partner to change a logo or adapt an address. We also hear from customers time and again that they want to be able to import the documents we create from the system – especially for cases such as ZUGFerd or XRechnung. We thought it could be done, so we put it on our agenda with the Issue 2.0 project.

The concept

As you can see, we have divided the project into three areas – modules and variable tree, performance and machine-readable documents.

Modules and variable tree

Here we want to address the possibility of modifying templates. To do this, we create a cross-template variable tree, which first creates a standardization for all variable elements in the templates. We then add module management to the whole thing. We define individual parts of a template such as the logo, stationery or address as modules. If you then add a module to the templates later, they access the variables contained in them. A change to the variables therefore leads to global changes to all templates that use the respective module.

JTL Wawi 1.4
Prototype JTL module management

Don’t worry: We will continue to support the previous templates indefinitely. The only catch in this case is that the changes made to the templates in JTL-Wawi 1.4 will not apply retroactively. The old templates therefore do not benefit from the new modules. However, if you use the new templates, editing should be easier and faster in the future. List & Label will be used for changes to the modules in future.

The performance

In terms of performance, we would like to make significant adjustments. We want to reduce our above example with 3,500 SQL queries to less than 10 SQL queries per form with Edition 2.0. The sporting difference is immediately noticeable when packing your packages. This is because the lower number of queries ensures faster transmission of the print form to the printer, and the packer receives the documents for the respective parcel correspondingly faster.

If a retailer currently wants to print an order with 500 items, the database queries for the order take 32 seconds, for the invoice 43 seconds. After our adjustments, we would like to reduce the speed to around 2 seconds for orders and invoices, but also for pick lists.

Machine-readable documents

In particular, we are planning to integrate ZUGFeRD, the electronic invoice format that we attach to the invoice as XML. As the format is of great importance not only in German-speaking countries, but also internationally, and is establishing itself as a standard, we want to make it available for our documents as part of future-proofing.

Current state of development

Some elements of the template processing are already so far in the bag that we were able to present them at this year’s Partner Convention. Our main focus during development was on the variable tree and its modules. One hurdle for us at the moment is the gain in performance. We are examining the possibilities of ensuring that the data is read out as efficiently as possible and thereby reducing the number of SQLs. However, such an approach is particularly time-consuming. The reason for this: We want to be able to pull as much data as possible with as few accesses as possible. This approach reduces communication with the server to a minimum. However, the data must be prepared accordingly on the server side. We have set ourselves high goals in this area and are of course trying to get as close to them as possible.

The last step after improving performance is for us to integrate a machine-readable format. We expect relatively few difficulties here. With the publication of the release candidate for JTL-Wawi 1.4, version 2.0 should of course be included in full form.

Our new version of ERP will offer even more advantages. We will continue to keep you up to date on these in the coming weeks in the form of these short developer diaries. After the release of the RC of JTL-Wawi 1.4, we will present the new functions in their fully integrated state in detail in our feature previews.

Published on:
27. April 2018