Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 5150730151264256: Issue 354 - Avoid a string copy that is unnecessary most of the time (Closed)

Created:
April 4, 2014, 3:07 p.m. by tschuster
Modified:
April 24, 2014, 10:46 a.m.
Visibility:
Public.

Description

Avoid a string copy that is unnecessary most of the time

Patch Set 1 #

Total comments: 1

Patch Set 2 : Avoid toUpperCase for RegexpFilter #

Total comments: 1

Patch Set 3 : Added domainSourceIsUpperCase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -3 lines) Patch
M lib/filterClasses.js View 1 2 4 chunks +20 lines, -3 lines 0 comments Download

Messages

Total messages: 13
tschuster
April 4, 2014, 3:13 p.m. (2014-04-04 15:13:08 UTC) #1
Wladimir Palant
Unnecessary or not - without this code the isActiveOnDomain() and isActiveOnlyOnDomain() methods are broken.
April 8, 2014, 11:28 a.m. (2014-04-08 11:28:18 UTC) #2
Wladimir Palant
http://codereview.adblockplus.org/5150730151264256/diff/5629499534213120/lib/filterClasses.js File lib/filterClasses.js (right): http://codereview.adblockplus.org/5150730151264256/diff/5629499534213120/lib/filterClasses.js#newcode315 lib/filterClasses.js:315: let list = this.domainSource.toUpperCase().split(this.domainSeparator); I see, I didn't realize ...
April 8, 2014, 12:10 p.m. (2014-04-08 12:10:05 UTC) #3
tschuster
On 2014/04/08 12:10:05, Wladimir Palant wrote: > http://codereview.adblockplus.org/5150730151264256/diff/5629499534213120/lib/filterClasses.js > File lib/filterClasses.js (right): > > http://codereview.adblockplus.org/5150730151264256/diff/5629499534213120/lib/filterClasses.js#newcode315 ...
April 8, 2014, 12:40 p.m. (2014-04-08 12:40:13 UTC) #4
tschuster
April 10, 2014, 5:41 p.m. (2014-04-10 17:41:32 UTC) #5
Wladimir Palant
http://codereview.adblockplus.org/5150730151264256/diff/5685265389584384/lib/filterClasses.js File lib/filterClasses.js (right): http://codereview.adblockplus.org/5150730151264256/diff/5685265389584384/lib/filterClasses.js#newcode316 lib/filterClasses.js:316: if (!(this instanceof RegExpFilter)) { I'd rather not hardcode ...
April 10, 2014, 6:43 p.m. (2014-04-10 18:43:38 UTC) #6
tschuster
On 2014/04/10 18:43:38, Wladimir Palant wrote: > http://codereview.adblockplus.org/5150730151264256/diff/5685265389584384/lib/filterClasses.js > File lib/filterClasses.js (right): > > http://codereview.adblockplus.org/5150730151264256/diff/5685265389584384/lib/filterClasses.js#newcode316 ...
April 10, 2014, 7:19 p.m. (2014-04-10 19:19:53 UTC) #7
Wladimir Palant
On 2014/04/10 19:19:53, tschuster wrote: > Adding a new property is a bad idea, because ...
April 11, 2014, 5:40 a.m. (2014-04-11 05:40:16 UTC) #8
tschuster
On 2014/04/11 05:40:16, Wladimir Palant wrote: > On 2014/04/10 19:19:53, tschuster wrote: > > Adding ...
April 11, 2014, 10:15 a.m. (2014-04-11 10:15:09 UTC) #9
Wladimir Palant
On 2014/04/11 10:15:09, tschuster wrote: > Nope. What do you think of |isDomainAlreadyUpperCase: function() { ...
April 12, 2014, 7:50 a.m. (2014-04-12 07:50:19 UTC) #10
tschuster
Added domainSourceIsUpperCase
April 16, 2014, 4:11 p.m. (2014-04-16 16:11:47 UTC) #11
tschuster
Sorry for being unclear. Properties just on the prototype is of course not a problem. ...
April 16, 2014, 4:14 p.m. (2014-04-16 16:14:27 UTC) #12
Wladimir Palant
April 16, 2014, 5:13 p.m. (2014-04-16 17:13:36 UTC) #13
LGTM

Powered by Google App Engine
This is Rietveld