Design your application for performance and functionality. Use a good data model, and use the paradigms of MorphX (copy what has already been done). The features of MorphX are built for optimized performance.
Keep in mind the following issues when you create your design.
Network setup:
-
The network that connects the client to Application Object Server (AOS) is slow. It is more efficient to make a small number of calls that transfer a large amount of data than it is to make a large number of calls that transfer a small amount of data.
-
The network that connects AOS to a database server is fast, but it is quicker to keep calls in the AOS than to call over the network.
-
Database servers are usually high-end and fast, but a single database server serves everyone, and represents the traditional performance bottleneck in the application.
Execution of X++ code:
-
All X++ statements are fast, but not as fast as compiled and machine-executable C++ code.
-
Creation of objects is more time-consuming, but still fast.
-
Database-related statements depend on the database design and load. Usually, selects are faster than inserts, inserts are faster than deletes, and deletes are faster than updates.
-
Calls between tiers (client/server) are slow.
-
Method calls are expensive. Try to reduce the number of calls. For example, do not call the same method several times if you can store a value from the method and instead use that value.
When you design, implement, and test for performance, use a database with a realistic number of records (millions) in the various tables in the database, a realistic number of concurrent users (hundreds), and a realistic configuration of network, clients, and servers.