Monday 17 March 2014

APEX 5 first peek - Performance

APEX 5 EA has shown some interesting improvements in regard to performance.


If you haven't noticed the swelling trend of flat designs in the past few years, you haven't been using the internet or held a smart device. Here are three good articles about this modernism, and like me you may learn the word skeuomorphic.

How does this affect APEX? Well of course all the icons have changed again.
How does this affect performance? The new icons are base64 encoded strings.

Where previously they were rendered like this:
<img src="/i/apex/builder/menu-pkg-128.png" width="128" height="128" alt="">

Now a small spacer image is used, then dressed up with a class with the image definition in the CSS file.
<img src="/i/f_spacer.gif" width="128" height="128" alt="" class="gi-Icon-pkg">

APEX5 rendering of CSS icon
This improves performance of your page. I find these days performance increases are not just improving your SQL & PL/SQL standards, but CSS & jQuery considerations for the browser as well.


The feature list described the following in regard to "Optimised application export format"
The APEX export file format has been optimized to make it easier to interrogate with diff/merge tools, to consumes less space, and make it faster to import.

So I thought I'd check it out:
APEX 4.2 export
APEX 5 export
As you may notice from the samples - extra spaces have been trimmed and unnecessary lines have been removed. A smaller export size might be beneficial for some of the applications I've worked on.
A quick import/export of a 4.2 application shows new export is 4/5 the original size - rather respectable.
4.2: 3,427,727 btyes
5.0: 2,730,066 bytes

I reminds me of much happiness when I discovered the TRIMSPOOL option in SQL*Plus

New export option "Export with Original IDs" is available for those for instance wanting to use diff tools.

APEX variables

I've previously posted about the dangers of using certain substitution options in your SQL, namely v('ITEM') and &SESSION.

The APEX team have now introduced some sys_context() options - and I've only discovered this so far thanks to Chris Neumueller posting on Jeff Kemp's post on the same issue.

This query returned successfully in the SQL workshop:
select sys_context('APEX$SESSION','app_session') app_session from dual

Recently I've found using context variables quite useful for improving performance and the parameterisation of views - spurred on by Jeff's great post on the topic. And we can both thank Connor McDonald for the idea.

Supplementary files

This topic requires a post on its own - and a bit more investigation, but maintenance and performance improvements have been gained.

No doubt there are some other performance nuggets to be found in the new release, not counting the productivity improvements for developers in the builder itself. Let me know if you find any!

No comments: