Very high cpu usage when running python code compared to pythonista
- Dominant language
- Perl
- Stars
- 3.9k
- Forks
- 213
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
- Environment:
iPhone 14 Pro
iOS 26.6
a-shell version 2.1.0
viewing CPU usage of iPhone with Xcode instruments
- Problem:
a-shell causes 100% cpu usage when running any python code, whereas other iOS python programs such as pythonista 3 uses a lot less cpu in comparison.
- Steps to reproduce:
1. run following simple python code in a-shell, or any other python code
import time
while True:
print("hello world")
time.sleep(1)
2. cpu usage spikes to 100%
3. run the same code on pythonista 3, cpu usage remains at 1%
It would be very appreciated if you fix this inefficiency regarding python... Everything with a-shell is perfect for my use case, except for this problem... ;w;
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the supplied infinite-loop example in a-shell on an iPhone 14 Pro and capture its CPU profile with Xcode Instruments, then compare it with Pythonista 3 as described. Done means the same sleeping Python loop no longer causes sustained 100% CPU usage in a-shell.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, python
- Domain
- cli, mobile, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100