[Wikidata-bugs] [Maniphest] [Commented On] T177311: 2% of /w/load.php spent in WebStart/onBeforeCreateEchoEvent for Wikibase

2017-10-05 Thread Krinkle
Krinkle added a comment.
@aude A week is fine. This isn't a regression from current week's branch.TASK DETAILhttps://phabricator.wikimedia.org/T177311EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: aude, KrinkleCc: Lydia_Pintscher, gerritbot, hoo, aude, thiemowmde, Krinkle, Aklapper, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Vali.matei, Lewizho99, Maathavan, Izno, Wikidata-bugs, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T177311: 2% of /w/load.php spent in WebStart/onBeforeCreateEchoEvent for Wikibase

2017-10-05 Thread aude
aude added a comment.
@Krinkle is it okay for this to wait to go out w/ the train next week or should we consider a backport?

(while I'm sure the patch works good, I would prefer the train, so the code has time on test wikis etc.)TASK DETAILhttps://phabricator.wikimedia.org/T177311EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: audeCc: Lydia_Pintscher, gerritbot, hoo, aude, thiemowmde, Krinkle, Aklapper, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Vali.matei, Lewizho99, Maathavan, Izno, Wikidata-bugs, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T177311: 2% of /w/load.php spent in WebStart/onBeforeCreateEchoEvent for Wikibase

2017-10-05 Thread Krinkle
Krinkle added a comment.

In T177311#3659950, @gerritbot wrote:
Change 382383 merged by jenkins-bot:
 [mediawiki/extensions/Wikibase@master] Split Echo hook handlers based on services needed

https://gerrit.wikimedia.org/r/382383


@aude Thanks for the quick patch!

	public static function newFromGlobalState() {
-		$wikibaseClient = WikibaseClient::getDefaultInstance();
-		$settings = $wikibaseClient->getSettings();
+		$settings = WikibaseSettings::getClientSettings();

		return new self(
-			$wikibaseClient->newRepoLinker(),
-			$wikibaseClient->getNamespaceChecker(),
			$settings->getSetting( 'echoIcon' ),
		);

Very nice. I didn't know WikibaseSettings::getClientSettings existed. That also avoids creating WikibaseClient's services.TASK DETAILhttps://phabricator.wikimedia.org/T177311EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: aude, KrinkleCc: Lydia_Pintscher, gerritbot, hoo, aude, thiemowmde, Krinkle, Aklapper, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Vali.matei, Lewizho99, Maathavan, Izno, Wikidata-bugs, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T177311: 2% of /w/load.php spent in WebStart/onBeforeCreateEchoEvent for Wikibase

2017-10-05 Thread gerritbot
gerritbot added a comment.
Change 382383 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Split Echo hook handlers based on services needed

https://gerrit.wikimedia.org/r/382383TASK DETAILhttps://phabricator.wikimedia.org/T177311EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: aude, gerritbotCc: gerritbot, hoo, aude, thiemowmde, Krinkle, Aklapper, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Vali.matei, Lewizho99, Maathavan, Izno, Wikidata-bugs, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T177311: 2% of /w/load.php spent in WebStart/onBeforeCreateEchoEvent for Wikibase

2017-10-05 Thread gerritbot
gerritbot added a comment.
Change 382386 abandoned by Aude:
Split hook handler that runs on Echo extension setup

https://gerrit.wikimedia.org/r/382386TASK DETAILhttps://phabricator.wikimedia.org/T177311EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, hoo, aude, thiemowmde, Krinkle, Aklapper, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Vali.matei, Lewizho99, Maathavan, Izno, Wikidata-bugs, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T177311: 2% of /w/load.php spent in WebStart/onBeforeCreateEchoEvent for Wikibase

2017-10-05 Thread gerritbot
gerritbot added a comment.
Change 382386 had a related patch set uploaded (by Aude; owner: Aude):
[mediawiki/extensions/Wikibase@master] Split hook handler that runs on Echo extension setup

https://gerrit.wikimedia.org/r/382386TASK DETAILhttps://phabricator.wikimedia.org/T177311EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, hoo, aude, thiemowmde, Krinkle, Aklapper, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Vali.matei, Lewizho99, Maathavan, Izno, Wikidata-bugs, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T177311: 2% of /w/load.php spent in WebStart/onBeforeCreateEchoEvent for Wikibase

2017-10-05 Thread gerritbot
gerritbot added a comment.
Change 382383 had a related patch set uploaded (by Aude; owner: Aude):
[mediawiki/extensions/Wikibase@master] Split Echo hook handlers based on services needed

https://gerrit.wikimedia.org/r/382383TASK DETAILhttps://phabricator.wikimedia.org/T177311EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, hoo, aude, thiemowmde, Krinkle, Aklapper, GoranSMilovanovic, QZanden, Vali.matei, Izno, Wikidata-bugs, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T177311: 2% of /w/load.php spent in WebStart/onBeforeCreateEchoEvent for Wikibase

2017-10-04 Thread hoo
hoo added a comment.
This should probably indeed be split up into different handlers, which might solve some of the problems here.

Also we could probably make WikibaseClient faster by lazy-creating the SiteLookup.

Regarding the NamespaceChecker construction: This is in parts so expensive due to the closure in mediawiki-config ($wgWBClientSettings['excludeNamespaces'] = function () { … } in wmf-config/Wikibase.php). We should try to avoid getting this setting if possible, but I don't see a nice way to make this faster.TASK DETAILhttps://phabricator.wikimedia.org/T177311EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: hooCc: hoo, aude, thiemowmde, Krinkle, Aklapper, GoranSMilovanovic, QZanden, Vali.matei, Izno, Wikidata-bugs, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T177311: 2% of /w/load.php spent in WebStart/onBeforeCreateEchoEvent for Wikibase

2017-10-04 Thread Krinkle
Krinkle added a comment.
The above flame graph is from HHVM profiling samples over 24 hours from production traffic. While useful to see the overall impact on average, it does not provide timings (due to being sampled). Here two profiles from XHGui for an individual request (including flamegraph).

https://performance.wikimedia.org/xhgui/run/flamegraph?id=59d4a63a3f3dfacf5d63a6ab (total: 1.3s)


EchoNotificationsHandlers::onBeforeCreateEchoEvent (111ms, 8%)


https://performance.wikimedia.org/xhgui/run/flamegraph?id=59d4a5ef3f3dfacf5daf6f40 (total: 45s)


EchoNotificationsHandlers::onBeforeCreateEchoEvent (231ms, 1%)
TASK DETAILhttps://phabricator.wikimedia.org/T177311EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: KrinkleCc: aude, thiemowmde, Krinkle, Aklapper, GoranSMilovanovic, QZanden, Vali.matei, Izno, Wikidata-bugs, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs