Today there was an updating of the Simple Ads Manager plugin. The plugin was updated to version 2.4.90. What changes? What is added?

Generally there were changes of a technical order for improving speed performance of the plugin and reducing load of the server. Also some functionality, to be exact, possibility of switch-off of collection of statistics was added.

However, about everything in sequence.

Reduced the number of SQL queries

Through the use of the operator UNION, managed to reduce the number of SQL queries in half. It also allowed to remove nested queries and to simplify logic of selection of the output ad. This accelerating is valid like for normal mode (PHP), and for mode of compatibility with caching plugins (javascript).

DB Tables Indexes

Generally, indexing of tables DB always increases database performance. However, at the beginning of development of a plug-in I forgot about it and somehow all didn’t reach hands. – I was reminded. Thank you, good man. Well, I indexed DB tables of the plugin.

Method of loading ads in Javascript mode

Until now, process of loading ads by plugin in caching plugins compatibility mode consisted of step-by-step sequence of AJAX requests for each ad. The plugin did the same also for fixing of data on viewing ads. This method seriously slowed down the loading of blog pages.

In new version of the plugin, this disadvantage was eliminated – now the loading ads is produced by “packet loading” with using one AJAX-request. The same method is using for registering ads hits.

Ability to disable the collecting of statistics

For owners of the blogs which are not needing ads hits statistical data, such opportunity will allow to accelerate loading of pages of the site and to reduce load of the server.

To disconnect the collecting of statistical data, visit the page of settings of a plug-in and on the Tools tab switch off the “Allow to collect and to store Statistical Data” parameter:

sam-stats-disable-en

Disabling/Enabling the collecting of statistical data

After switch-off of collection of statistical data, the tracing of hits and their recording into the DB table will be completely disabled.

Bug of loading large data into the grid

Unfortunately, the library W2UI is written to work with jQuery in normal mode, but WordPress is working with jQuery in no-conflict (protected) mode. Despite the fact that I spent a lot of time trying to put the work of library to protected mode, all unprotected operators from the first time it was not possible to alter that caused an error when scrolling in “posts/pages” grid  when downloading a lot of data on plugin’s “Ads Editor” page. Nevertheless, the work of adaptation this library is completed and properly verified. Everything should work as expected.

P.S.

As you can see, the major changes of the plugin for this version, excluding the last paragraph, can be summed up in one expression: “Fight for speed.” And, I hope that I managed to win fight for speed.

© 2014 – 2017, minimus. All rights reserved.