Opened 4 years ago

Closed 3 years ago

#1600 closed Bug (fixed)

Action datatables should use integer indexes rather than string indexes (smaller size and faster access)

Reported by: matt Owned by: matt
Priority: major Milestone: Piwik 1.2
Component: Core Keywords:
Cc: Sensitive: no


Currently datatables for Actions are indexed with the metrics string (nb_visits, nb_hits, etc.). See code in plugins/Actions/Actions.php archiveDay()

Other datatables are using integer indexes, mapping is defined in Piwik_Archive::$mappingFromIdToName

Actions datatable should use a similar integer mapping to reduce size of Actions datatables, and make querying faster.

Change History (4)

comment:1 Changed 3 years ago by matt (mattab)

  • Milestone changed from 1.2 Piwik 1.2 to 1.x - Piwik 1.x

comment:2 Changed 3 years ago by matt (mattab)

  • Milestone changed from 1.x - Piwik 1.x to 1.2 Piwik 1.2

thanks to halfdan run of xhprof, we now know that this is indeed very costly, lets fix it

comment:3 Changed 3 years ago by matt (mattab)

  • Owner set to matt

comment:4 Changed 3 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

(In [3696]) Page titles report improvements fixes #1898

  • new fields in 2 log tables (major schema upgrade in next release!)
  • code refactored and optimized, (only the UI to display top entry/exit page titles is missing)

Performance improvements

  • Actions Archiving is much more efficient, removed many JOINs and updating algorithm so that we select and parse action names only once per action.
  • Fixes #1600: datatables now indexed by int, no data migration but code works with both old and new data structure
  • Fixes #1780: new index

Improvements to integration tests

  • never loads the Provider plugin in proxy-piwik.php since reverse ip lookup slows up tests a lot
  • fixing a test result that were previously incorrect (_withCookieSupport) because a static cache wasn't cleaned after each test
Note: See TracTickets for help on using tickets.