Photonic Version 2.21 – Performance Release

Photonic Version 2.21 is out. The core focus of this release is performance, and there are several pieces that should help here.

  1. Conditional and Deferred Loading:
    Photonic has two main components on the front-end – JavaScript and CSS. In this release I have ensured that the JS for Photonic gets included only on pages where the plugin is active. Moreover the JS has been pushed out to the footer instead of the header, thereby letting the rest of your code load. I did have to take care of multiple aspects here, which is why this was not done so far.
    The CSS will still continue to be loaded on all pages and in the header, but I have taken steps to reduce the footprint. The reason for the CSS not being pushed out to the footer is because it goes against the W3 Spec for CSS definitions, and it can cause some nasty UI surprises while the rest of your page is loading. The inability to move it out of the header makes it imperative for the CSS to be loaded on all pages, since plugin has no knowledge of whether the shortcode is being used when the page starts loading.
  2. No jQuery UI
    I was using two components of jQuery UI: a tooltip and a dialog box (for password-protected galleries). Unfortunately these came with a lot of baggage. They downloaded a combined total of 8 JavaScript files totaling ~70KB. So in this release I replaced them with plain JavaScript code that took up a total of 5.5KB and removed all the jQuery UI dependency.

    Note that jQuery UI is different from jQuery, and the latter still remains as a dependency. Removing that is a much harder task that will have to be weighed judiciously.

  3. Support for Other Plugins
    I made some tweaks to code to make Photonic play nice with other plugins. Previously Photonic had an escape-hatch (the alternative shortcode), but now, while the escape hatch is still present, you will hopefully have to rely on it a lot less.
  4. Bug Fixes
    The following were fixed in this release:

    1. A mosaic layout bug on small screens was causing photos in the last row to get positioned badly.
    2. The interactive shortcode builder was not able to process authenticated SmugMug calls.
    3. If Colorbox was the lightbox and Photonic was being used as a lightbox for non-Photonic images, it was not working.
    4. On slow connections with the square thumbnail display showing the titles below the thumbnail was causing the titles to appear as a long, narrow column.

Hope you enjoy the performance boost in this release!

Sorry, the comment form is closed at this time.