Reputation: 3871
I'm currently developing a mobile single page webapp using React and Nuclear.js with Immutable.js.
When I due with click event, there's always a delay about 200ms long. I thought it was because the "click delay" problem, so I changed to touch events, which is onTouchStart in React.
But the delay seems still there. I use timeline view in devtools to investigate the delay, found the time was cost in "native v8natives.js:1229", as shown below:
I'm wondering what is the delay? and why it is always there, even when I use touch events instead of click.
Upvotes: 1
Views: 460
Reputation: 3871
I investigated it further today. The time shown in the chart is not that accurate and kind of misleading.
In fact, the time of the execution is included in that delay, though it is not shown.
So after digged into my scripts, using console.time()
and performance tools packaged with React, the delay now is decreased dramatically.
Upvotes: 1