Closed Bug 858435 Opened 11 years ago Closed 11 years ago

getOffset cost between 4-6ms most of the time and sometimes more than 10ms

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

ARM
All
defect
Not set
normal

Tracking

(b2g18 fixed)

RESOLVED FIXED
Tracking Status
b2g18 --- fixed

People

(Reporter: vingtetun, Assigned: djf)

References

Details

Attachments

(1 file)

I receive an anonymous gal's sms this morning suggesting that the getOffset call of apps/keyboard/js/keyboard.js create sync reflows and is also useless for latin keyboard. Returning 0,0 for them would be ok for it.

I will make a patch if nobody beats me at it.
Attached patch Patch (deleted) — Splinter Review
The patch just remove x,y parameters to the click method of any imes since I don't see where they are used.
Attachment #734611 - Flags: review?(dflanagan)
I was hoping to start using those x,y values eventually, to make autocorrect and predictions better.

But not if they are expensive on each keystroke.  Can we cheaply pass the x and y coordinates from the touchstart event instead?

I haven't looked at the patch yet, but maybe I'll just r+ this and then add the x and y back when I'm ready to use them.
Comment on attachment 734611 [details] [diff] [review]
Patch

I have not tested the patch, but the change looks safe to me.

For the record, I have no idea what getOffset() and getKeyCoordinateY() are for. They predate my time with the keyboard and have always confused me.
Attachment #734611 - Flags: review?(dflanagan) → review+
(In reply to David Flanagan [:djf] from comment #3)
> I haven't looked at the patch yet, but maybe I'll just r+ this and then add
> the x and y back when I'm ready to use them.

Please :). Let's not keep expensive things until we really need them.
Attachment #734611 - Flags: approval-gaia-v1+
I was not able to uplift this bug to v1-train.  If this bug has dependencies which are not marked in this bug, please comment on this bug.  If this bug depends on patches that aren't approved for v1-train, we need to re-evaluate the approval.  Otherwise, if this is just a merge conflict, you might be able to resolve it with:

  git checkout v1-train
  git cherry-pick -x  c468c590989d888464cf614cf0d6b608f46cfefd
  <RESOLVE MERGE CONFLICTS>
  git commit
I was not able to uplift this bug to v1-train.  If this bug has dependencies which are not marked in this bug, please comment on this bug.  If this bug depends on patches that aren't approved for v1-train, we need to re-evaluate the approval.  Otherwise, if this is just a merge conflict, you might be able to resolve it with:

  git checkout v1-train
  git cherry-pick -x  c468c590989d888464cf614cf0d6b608f46cfefd
  <RESOLVE MERGE CONFLICTS>
  git commit
Can you supply a patch to uplift / uplift yourself on effected branches?
Flags: needinfo?(nobody)
David, can you supply a patch that applies cleanly?
Assignee: nobody → dflanagan
Flags: needinfo?(nobody) → needinfo?(dflanagan)
It looks like this patch has already been uplifted.  I don't know how.
Flags: needinfo?(dflanagan)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: