Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    $ echo 3 > /proc/sys/vm/drop_caches
    $ time python2 -c 'help("modules")' >/dev/null
        /usr/lib64/python2.7/site-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed
      import gobject._gobject
    python2 -c 'help("modules")' > /dev/null  1.58s user 0.23s system 69% cpu 2.626 total
    $ time python3 -c 'help("modules")' > /dev/null
    python3 -c 'help("modules")' > /dev/null  2.00s user 0.17s system 74% cpu 2.928 total
    $ time python2 -c 'help("modules")' >/dev/null
    /usr/lib64/python2.7/site-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed
      import gobject._gobject
    python2 -c 'help("modules")' > /dev/null  1.26s user 0.11s system 99% cpu 1.375 total
    $ time python3 -c 'help("modules")' > /dev/null
    python3 -c 'help("modules")' > /dev/null  1.75s user 0.09s system 99% cpu 1.852 total
perhaps your issue is having too many things installed?


The laptop I'm working on was decent when new, six years ago, but is now not the fastest thing on the block. It has certainly collected quite a lot of things there (mostly from system packages), but it is probably just one or two things that are spending most of the time (excluding I/O time).

It's interesting; now that I've tried running it a few more times, `help('modules')` on my Python 2.7 is getting down to six or so seconds. (On Python 3 it takes around 0.15 seconds.)


Wow! My Pthon2 help('modules') opens a window titled "Hello from wxPython"!

Python3 behaves well, and both succeed...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: