This improves the performance of the All Websites Dashboard. It includes improvements on several layers:
MultiSites.getAlltwice whenever the websites dashboard was loaded. One to get the current dashboard and one request to get the previous one (this was needed for a hover tooltip, the
past_data.total.nb_visits). We do now only one request as the
MultiSites.getAllalready always requested the past data anyway. I do now expose this total visits value as well
MultiSites.getAllon the server much faster. Eg before it took easily > 300 seconds to perform one
MultiSites.getAllrequest when having 33k sites. This is now done in less than 10 seconds. If only a few sites are archived, and browser archiving is disabled, the performance improved from > 60 seconds to < 5 seconds. Basically a problem was that we first created eg 100K DataTables, 1mio Rows, ... just to merge them afterwards together via
mergeChildrento 1 DataTable and 33k Rows. This took a long time. Instead we want to directly build the merged dataTable. There are many changes in this pull request and each of them has actually a huge impact on MultiSites.getAll performance.
Needs a rebase & then +1 to merge it before the beta/RC