Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(708)

Issue 417373003: Web Search is happening for whitespace selection (Closed)

Created:
6 years, 5 months ago by Cyan
Modified:
6 years, 4 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, AKVT, AviD, ankit
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Web Search is happening for whitespace selection. Searching for a whitespace in the web has no meaning because it's not going to return any relevant result.So,I have taken care to remove the leading and trailing whitespaces to make the search more optimized. BUG=397794

Patch Set 1 #

Patch Set 2 : Removing presubmit warning and submitting. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 1 chunk +2 lines, -1 line 1 comment Download

Messages

Total messages: 7 (0 generated)
Cyan
@jdduke: PTAL
6 years, 5 months ago (2014-07-26 11:18:22 UTC) #1
jdduke (slow)
How often does this happen in practice? https://codereview.chromium.org/417373003/diff/20001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/417373003/diff/20001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode2049 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:2049: if (TextUtils.isEmpty(query)) ...
6 years, 4 months ago (2014-07-28 15:21:23 UTC) #2
aurimas (slooooooooow)
On 2014/07/28 15:21:23, jdduke wrote: > How often does this happen in practice? > > ...
6 years, 4 months ago (2014-07-28 22:38:04 UTC) #3
Cyan
On 2014/07/28 22:38:04, aurimas wrote: > On 2014/07/28 15:21:23, jdduke wrote: > > How often ...
6 years, 4 months ago (2014-07-30 14:31:02 UTC) #4
jdduke (slow)
On 2014/07/30 14:31:02, Cyan wrote: > @jdduke: > if (TextUtils.getTrimmedLength(query) <= 0) return; condition,as suggested ...
6 years, 4 months ago (2014-07-30 15:06:53 UTC) #5
aurimas (slooooooooow)
On 2014/07/30 15:06:53, jdduke wrote: > On 2014/07/30 14:31:02, Cyan wrote: > > @jdduke: > ...
6 years, 4 months ago (2014-07-30 18:31:30 UTC) #6
Cyan
6 years, 4 months ago (2014-07-30 18:59:48 UTC) #7
On 2014/07/30 18:31:30, aurimas wrote:
> On 2014/07/30 15:06:53, jdduke wrote:
> > On 2014/07/30 14:31:02, Cyan wrote:
> > > @jdduke:
> > >  if (TextUtils.getTrimmedLength(query) <= 0) return; condition,as
suggested
> by
> > > you
> > > is fixing the issue as well.Please suggest me whether I can upload the
> > modified
> > > patch.
> > > @aurimas:
> > >  Although I raised the bug with only space selection but the real purpose
> > behind
> > > the
> > >  fix is to send the proper string( with unnecessary whitespaces removed
from
> > > front and
> > >  back of the srting) being queried. Please suggest your opinion regarding
> > > this.thanks.
> > 
> > This sounds like a premature optimization. A few extra characters in the
> search
> > query are not going to meaningfully impact end-to-end memory/CPU usage, and
> the
> > marginal cost of their inclusion is minimal.  Creating a new string by
> trimming
> > on every query however seems more wasteful (more garbage).
> 
> Agreed. Let's not proceed with this.

As per discussion I'll close the review. Thanks for the review comments.

Powered by Google App Engine
This is Rietveld 408576698