Opened 14 years ago
Closed 5 years ago
#502 closed enhancement (duplicate)
pexpect -- optimize; maybe update to newest version?
Reported by: | was | Owned by: | was |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | interfaces | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | Jeroen Demeyer | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
pexpect is at version 2.1, but SAGE uses 2.0. Investigate why 2.1 is so much slower. Also, speed everything up more. Says dropdrive on irc:
13:53 < dropdrive> was_: I looked into the pipes being slow thing, and Pexpect is just horrible with large amounts of data (O(n^2)). I made a fix (O(n)) that reads 6MB/s. But pexpect will always be slow if you have to call .expect many times (twice per line as it stands), because pexpect slices its buffer every time. 13:55 < dropdrive> was_: So if you read a 4096-byte block from a pipe, and .expect gets called every 80 characters, pexpect will build buffer[80*n:] for n from 1 to 50
Change History (8)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
- Milestone set to sage-3
comment:3 follow-up: ↓ 7 Changed 11 years ago by
- Report Upstream set to N/A
pexpect is now in version 2.3. We appear to still have version 2.0 (? it's hard to tell, no obvious pexpect version command). Anyway, might upgrading render this obsolete?
comment:4 Changed 7 years ago by
Recent version of pexpect is 3.3 (http://pexpect.readthedocs.org/en/latest/index.html) which could be installed using pip. But installing this version will result in failing doctests.
comment:5 Changed 5 years ago by
- Milestone changed from sage-feature to sage-duplicate/invalid/wontfix
- Reviewers set to Jeroen Demeyer
- Status changed from new to needs_review
Fixed by #10295.
comment:6 Changed 5 years ago by
- Status changed from needs_review to positive_review
comment:7 in reply to: ↑ 3 Changed 5 years ago by
Replying to kcrisman:
pexpect is now in version 2.3. We appear to still have version 2.0 (? it's hard to tell, no obvious pexpect version command). Anyway, might upgrading render this obsolete?
Just for information: pexpect
seems to become slower with every upgrade...
comment:8 Changed 5 years ago by
- Resolution set to duplicate
- Status changed from positive_review to closed
From dropdrive: