Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paste is slow with high CPU usage #546

Closed
goetzc opened this issue Jun 19, 2015 · 5 comments
Closed

Paste is slow with high CPU usage #546

goetzc opened this issue Jun 19, 2015 · 5 comments

Comments

@goetzc
Copy link

@goetzc goetzc commented Jun 19, 2015

In my setup pasting text is really slow, with a high CPU usage.
For example pasting this 10-line function takes like 10 seconds:

def function_a():
    print('First line')
    print('Second line')
    print('Third line')

    for i in range(10):
        print(i)

    print('etc')
    print('etc')
    print('etc')

bpython version 0.14.1 on top of Python 3.4.3 /usr/bin/python

If I can provide you with more information, I would be happy to do so.

EDIT: KDE 4 (Qt 4.8.7), with Konsole 15.08 (KDE Frameworks 5.15, Qt 5.5.1). The same behavior using Python 3.5.

@thomasballinger
Copy link
Member

@thomasballinger thomasballinger commented Nov 2, 2015

@goetzc Is there anything else you can share about it?

This is normally prevented by noticing that so many bytes are coming in at once (more than 20 I believe) that this should be treated as a paste event, and the display not redrawn until all the byte have been read. Is there anything unusual about your setup?

@goetzc
Copy link
Author

@goetzc goetzc commented Nov 2, 2015

I just tested it in another setup using KDE Plasma 5 (same KF and Qt version as the affected system) and the paste function is fast.

The affected system uses KDE 4, maybe the text clipper (klipper) has something to do, or Konsole.
But both systems use the same Konsole version.

@thomasballinger
Copy link
Member

@thomasballinger thomasballinger commented Dec 7, 2015

#584 might fix this problem, @goetzc let me know if you try it out.

@goetzc
Copy link
Author

@goetzc goetzc commented Dec 12, 2015

With 0.14.2 and commit 64d875e merged with conflicts, I can tell it is now much faster!

@thomasballinger
Copy link
Member

@thomasballinger thomasballinger commented Dec 12, 2015

Great! This is probably too large a change to be a bugfix, so I'm marking this closed now and it will be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.