Home | Wordpress | Wordpress Plugins | SAM 2.4.90. Fight for speed

SAM 2.4.90. Fight for speed

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.

About minimus

Local and Web Programmer. Development using Object Pascal, C#, SQL, PHP, Javascript.

Check Also

XAds for SAM Pro

This addon provides extended visualization of ads served by SAM Pro (Lite and Free edition). …

7 comments

  1. Hi,

    I tested your Simple Ads Manager this summer. It worked superb.

    Now we updated our website and I wanted to download your Simple Ads Manager plugin again for installing on our wordpress-site.

    But on the page https://wordpress.org/plugins/simple-ads-manager/ I got this message below:
    Whoops!
    We couldn’t find that plugin.
    I can’t find the .zip-file of your Simple Ads Manager plugin anymore. Can you help?

    With regards,

    Michael

     
    Total Comments by Michael: 2

  2. Hi, sorry for my English…  I want download you plugin, but cant do it on forum-link.   SimpleLib Forum You do not have permission to view this page or perform this action.
    Total Comment by Yaroslav: 1

  3. Hello, what is happening with the plugin page? I get an error message that says: “We couldn’t find that plugin.” Is it not going to be available for download anymore?
    Total Comment by Grace B.: 1

Leave a Reply

Your email address will not be published. Required fields are marked *