This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2016年07月16日 23:19 by terry.reedy, last changed 2022年04月11日 14:58 by admin.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| run_autocomplete.diff | terry.reedy, 2016年07月16日 23:19 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 2011 | closed | cheryl.sabella, 2017年06月08日 19:20 | |
| Messages (6) | |||
|---|---|---|---|
| msg270592 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2016年07月16日 23:19 | |
This issue continues #25507. I still want to reduce the number of modules imported when run.py starts a user process and the time they require. In the process, I expect to reduce the number of tkinter module imports that need to be reversed and thereby make parts of the #25507 fix unnecessary. "New changeset 93d325c64104 by Terry Jan Reedy in branch 'default': Issue #25507: Move 4 objects from pyshell to run and switch inports. https://hg.python.org/cpython/rev/93d325c64104" This commit for #25507 was not needed for the fix I eventually choose, but it reduced the size of sys.modules in the user process from 193 to 156. I have since determined that it reduced the time for startup imports on my machine from .45 to .25 seconds. I now regard it as the first patch for this issue. The attached file was explained in msg270522. This and similar refactorings should be done when or after I have otherwise revised the module and tests in question. For a Windows build of repository 3.6, importing tkinter into a fresh python process increases len(sys.modules) from 41 to 65. But run only imports tkinter so it can call _tkinter.tkapp().eval('update') in its interactive input loop. If other indirect imports were eliminated, I suspect _tkinter could be imported instead. |
|||
| msg295460 - (view) | Author: Cheryl Sabella (cheryl.sabella) * (Python committer) | Date: 2017年06月08日 19:19 | |
Terry, I've applied this patch to 3.7 and made a pull request. This seemed like a fix you wanted to move forward with, so I hope that's helpful. |
|||
| msg295470 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2017年06月08日 21:45 | |
Yes, I do want to continue this. As I explained in msg270522, I shelved (but not abandoned) the autocomplete patch because it caused a test failure I did not (and do not) understand, and because I found another fix for that issue. The reductions I noted above were for the patch I did apply, not this one. Update: I just created pr_2011 and test_idle passes. I'm puzzled. I don't remember patching autocomplete since last July. Anyway, if the patch works, I can now decide if I really want to go this route. It makes sense to keep related functions together. It also makes sense to keep functions that run in the same process together. I should see if this patch has any noticeable benefit (time and import reduction) and if a similar patch for call tips works and has benefit. |
|||
| msg295471 - (view) | Author: Cheryl Sabella (cheryl.sabella) * (Python committer) | Date: 2017年06月08日 22:11 | |
Yes, I ran test_idle before I submitted the pull request. I wasn't sure if I was missing something based on your comments of the test failing. |
|||
| msg341654 - (view) | Author: anthony shaw (anthonypjshaw) * (Python triager) | Date: 2019年05月06日 22:29 | |
It would be great for this issue to be revisited, there has been some further interest from users. |
|||
| msg373550 - (view) | Author: Cheryl Sabella (cheryl.sabella) * (Python committer) | Date: 2020年07月12日 09:17 | |
I'm going to close the PR for this as the change is out of date with newer changes to fetch_completions and fetch_completions is being rewritten for #37766. It would be easiest to revisit this once the other changes to fetch_completions are set. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:33 | admin | set | github: 71721 |
| 2020年07月12日 09:17:16 | cheryl.sabella | set | messages: + msg373550 |
| 2019年05月06日 22:29:19 | anthonypjshaw | set | nosy:
+ anthonypjshaw messages: + msg341654 |
| 2017年07月09日 02:26:03 | terry.reedy | link | issue8231 dependencies |
| 2017年06月08日 22:11:34 | cheryl.sabella | set | messages: + msg295471 |
| 2017年06月08日 21:45:38 | terry.reedy | set | messages:
+ msg295470 versions: + Python 3.7 |
| 2017年06月08日 19:20:05 | cheryl.sabella | set | pull_requests: + pull_request2077 |
| 2017年06月08日 19:19:13 | cheryl.sabella | set | nosy:
+ cheryl.sabella messages: + msg295460 |
| 2016年07月25日 00:08:07 | terry.reedy | link | issue27609 dependencies |
| 2016年07月16日 23:19:16 | terry.reedy | create | |