Apify and Crawlee Official Forum

Updated 4 months ago

Super slow keyboard input in puppeteer on Apify

When running on Apify platform it takes ~600-700 ms per character typed as compared to ~200ms when running locally

Local log:
Plain Text
INFO  Typing in username
t: 657.061ms
e: 423.833ms
s: 257.407ms
t: 193.945ms
i: 178.453ms
n: 184.146ms
g: 433.292ms
a: 177.324ms
l: 329.187ms
o: 257.441ms
n: 174.344ms
g: 172.594ms
e: 207.201ms
r: 190.504ms
u: 175.215ms
s: 170.764ms
e: 171.623ms
r: 175.915ms
n: 181.519ms
a: 214.39ms
m: 179.304ms
e: 174.289ms
username input: 5.288s
INFO  Tabbed to password box
INFO  Typing in password
password input: 2.196s
password input 123456790


Same code on Apify platform:
Plain Text
2022-11-05T02:24:36.426Z INFO  Typing in username
2022-11-05T02:24:37.322Z t: 893.089ms
2022-11-05T02:24:37.936Z e: 616.245ms
2022-11-05T02:24:38.527Z s: 590.538ms
2022-11-05T02:24:39.315Z t: 788.029ms
2022-11-05T02:24:40.187Z i: 871.27ms
2022-11-05T02:24:41.115Z n: 928.207ms
2022-11-05T02:24:41.782Z g: 667.01ms
2022-11-05T02:24:42.400Z a: 617.539ms
2022-11-05T02:24:43.221Z l: 820.952ms
2022-11-05T02:24:43.885Z o: 663.796ms
2022-11-05T02:24:44.498Z n: 612.816ms
2022-11-05T02:24:45.244Z g: 746.248ms
2022-11-05T02:24:45.879Z e: 633.906ms
2022-11-05T02:24:46.442Z r: 563.169ms
2022-11-05T02:24:47.040Z u: 598.015ms
2022-11-05T02:24:47.632Z s: 591.028ms
2022-11-05T02:24:48.232Z e: 600.617ms
2022-11-05T02:24:48.796Z r: 540.979ms
2022-11-05T02:24:49.308Z n: 533.868ms
2022-11-05T02:24:50.104Z a: 796.115ms
2022-11-05T02:24:50.904Z m: 799.322ms
2022-11-05T02:24:51.521Z e: 617.122ms
2022-11-05T02:24:51.523Z username input: 15.094s
2022-11-05T02:24:52.002Z INFO  Tabbed to password box
2022-11-05T02:24:52.004Z INFO  Typing in password
2022-11-05T02:24:58.709Z password input: 6.707s
2022-11-05T02:24:58.711Z password input 123456790
1
s
A
A
4 comments
Well for now I will just use another way to do it...
just advanced to level 6! Thanks for your contributions! πŸŽ‰
try await page.type(".your-selector", "your data", {delay: 10})
How are you actually measuring that? If there are await s in between, then the code can jump to other parallel computations.
Add a reply
Sign up and join the conversation on Discord