? Success

User tests: Successful: Unsuccessful:

avatar smz
smz
7 Jun 2015

Description

several methods from MultilangstatusHelper are called multiple times in the life of a Joomla! process.
This PR optimize this by locally caching the results

Testing procedure

  • Use a multilingual site
  • Verify that everything is "business as usual" (a.k.a: SNAFU... :smile: ) with and without this PR, both in the front-end and in the back-end.
  • Turn on Joomla Debug in global configuration and verify that several duplicated queries are now gone.

Even better: apply this together with #7137 and follow testing instruction there. If OK, you can give "@test OK" to both PRs

Additional comments

Thanks to "Viper" and "Robert G Mears" that have brought duplicate queries to my attention.
This might be a first in a series...

avatar smz smz - open - 7 Jun 2015
avatar smz
smz - comment - 7 Jun 2015

I'm really unsure if this may have nasty side effects in the backend if/when you publish/unpublish languages... I should have tested that... :flushed:

avatar smz
smz - comment - 7 Jun 2015

... so far I can't see any issues generated by this...

a9cac66 7 Jun 2015 avatar smz CS
avatar joomla-cms-bot joomla-cms-bot - change - 7 Jun 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 7 Jun 2015
Category Multilanguage
avatar zero-24 zero-24 - change - 7 Jun 2015
Status New Pending
avatar smz
smz - comment - 7 Jun 2015

@dgt41 Is that what you meant?
I guess throwing 500 is OK here...

avatar smz
smz - comment - 7 Jun 2015

Should we reserve the same treatment to all queries in this class?

avatar dgt41
dgt41 - comment - 7 Jun 2015

@smz Yes! Sorry for the late response…

avatar smz
smz - comment - 7 Jun 2015

:+1: :smile:

avatar smz
smz - comment - 7 Jun 2015

Took the bull by its horns and applied the same treatment to other methods that I know are called
more than once...

Testing instructions do not change.

Even better: apply this together with #7137 and follow testing instruction there. If OK, you can give "@test OK" to both PRs

avatar smz smz - change - 7 Jun 2015
The description was changed
Title
Fixes duplicate queries from getSitelangs()
Fixes duplicate queries from MultilangstatusHelper
avatar smz smz - change - 7 Jun 2015
Title
Fixes duplicate queries from getSitelangs()
Fixes duplicate queries from MultilangstatusHelper
avatar smz smz - change - 7 Jun 2015
The description was changed
avatar smz smz - change - 7 Jun 2015
The description was changed
avatar smz
smz - comment - 7 Jun 2015

Forget about #7137: it was a HUGE mistake

avatar smz
smz - comment - 8 Jun 2015

The reports of #7137's death have been greatly exaggerated.

After all it can be done...

avatar smz smz - change - 8 Jun 2015
The description was changed
avatar smz
smz - comment - 30 Jun 2015

In Joomla Issues this results as "Pending" ( The Travis CI build is in progress), but actually Travis did his job already...

avatar zero-24
zero-24 - comment - 30 Jun 2015

@smz

We have known issues on syncing travis results. If it passes here all is good :smile:

avatar smz
smz - comment - 30 Jun 2015

@zero-24 Thanks!

avatar infograf768
infograf768 - comment - 1 Jul 2015

I have not tested, but please do not delete the comments for each function.

avatar smz
smz - comment - 1 Jul 2015

The comments I'm removing are repetition of what is indicated just a couple of lines above in the docbloc... Do you really want me to reinstate them?

avatar infograf768
infograf768 - comment - 2 Jul 2015

No need, you are right.

avatar smz smz - change - 13 Jul 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-07-13 08:10:04
Closed_By smz
avatar smz smz - close - 13 Jul 2015

Add a Comment

Login with GitHub to post a comment