Performance Guidelines

Like ant other system, there are ways to improve the performance of applications in NeuroKernel. Here are some hints on how to improve performance, memory usage and to optimize size of the executable.

1. Using CodeSegment Annotations

When compiling for client side, it is possible to reduce the code size by asking code generators to leave out some of the sub modules. This can be done using code segment annotations highlighted in Configure Annotation. The java to javascript compilers can leave out code that is not used. When compiled NeuroKernel applications keeps almost all the task container system interfaces; however, using code segment annotations some of these interfaces can be left out of compilation. This means making call to these interfaces either wont work or give runtime exceptions so carefully choose what to use or what not to if you want to further optimize the code size.

2. Heavy UI and Using Plugins

If the applications is running at the server side and needs to display a big table or list, it is best to move heavy tables and list into client side plugin applications. Plugin applications will seamlessly be part of the parent application. Keeping heavy parts of your server side application at the client side using plugin technology is what makes NeuroKernel/OS unique. The plugin can even be loaded from a remote host which would create a revenue stream for many companies and developers offering various heavy UI as a client side plugin application.

3. Limit SVG Usage

We do not recommend using SVG unless it is absolutely necessary. The SVG implementation in browsers is bloated, slow and eats up a lot heap memory. SVG by no means is optimized by browser vendors. Complex SVG images will render browser non responsive. If you must use SVG, try to use optimization tools that will reduce your SVG to a path element or similar. 2D Graphics API of NeuroKernel can draw SVG paths. It is recommended to use Canvas instead of SVG where possible. NSVGImage class offers a SVG to Bitmap image conversion which is another good option. NSVGImage also has a SVG Vector Image option which is categorically not recommended for large SVG files.