Page MenuHomePhabricator

Consider using instanceof instead of TokenUtils::getTokenType
Closed, ResolvedPublic

Description

In most cases instanceof can do the job instead of the more expensive getTokenType and a string comparison.

Event Timeline

ssastry created this task.May 14 2019, 4:19 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 14 2019, 4:19 AM
ssastry triaged this task as Medium priority.May 14 2019, 4:21 AM
ssastry moved this task from Backlog to Performance on the Parsoid-PHP board.
ssastry assigned this task to Sbailey.Sep 25 2019, 2:08 PM

Change 540706 had a related patch set uploaded (by Sbailey; owner: Sbailey):
[mediawiki/services/parsoid@master] Replace TokenUtils::getTokenType with instanceof or is_string

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

Change 540706 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Replace TokenUtils::getTokenType with instanceof or is_string

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

ssastry lowered the priority of this task from Medium to Low.Oct 7 2019, 8:12 PM
ssastry moved this task from Performance to Porting Tech Debt Redressal on the Parsoid-PHP board.
Sbailey closed this task as Resolved.Oct 9 2019, 8:30 PM