V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
xxabc3966
V2EX  ›  问与答

为什么 Selenium 里 chrome 去 get url 时,时间远超 firefox?

  •  
  •   xxabc3966 · 2017-09-27 15:05:21 +08:00 · 1078 次点击
    这是一个创建于 2441 天前的主题,其中的信息可能已经有所发展或是发生改变。
    测试语句如下:

    In [13]: driver = webdriver.Chrome()

    In [14]: %time driver.get('http://www.baidu.com')
    CPU times: user 1.1 ms, sys: 1.07 ms, total: 2.17 ms
    Wall time: 3.47 s


    In [16]: firefox = webdriver.Firefox()

    In [17]: %time firefox.get('http://www.baidu.com')
    CPU times: user 1.08 ms, sys: 1.06 ms, total: 2.14 ms
    Wall time: 637 ms


    chrome 的 Wall time 远超过 firefox。这是什么原因啊?有什么优化的方法吗?
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2506 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 15:36 · PVG 23:36 · LAX 08:36 · JFK 11:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.