Comments (7)
I had actually thought about this issue. The only problem is incurring a call
for time.time() in every step. I'll see if that can be avoided (maybe using an
alarm, or a secondary thread), but it might even not be worth it.
Original comment by [email protected]
on 3 Aug 2010 at 5:13
- Added labels: Priority-High
- Removed labels: Priority-Medium
from python-progressbar.
+1, maybe ETA can be used to determine number of updates required for smooth
operation?
Original comment by [email protected]
on 14 Dec 2010 at 3:14
from python-progressbar.
I'm not convinced that calling `time.time()` is a large problem
From IPython
In [1]: import time
In [2]: %timeit time.time()
1000000 loops, best of 3: 269 ns per loop
Original comment by Wolphie
on 14 Dec 2010 at 3:28
from python-progressbar.
Interesting. It's a bit slower in the machine I'm using right now:
In [22]: %timeit pbar._need_update()
timeit1000000 loops, best of 3: 617 ns per loop
In [23]: %timeit time.time()
1000000 loops, best of 3: 1.37 µs per loop
Adding a call to time.time() in _need_update() increases the time of a single
call to:
In [54]: %timeit pbar._need_update()
100000 loops, best of 3: 2.31 µs per loop
Original comment by [email protected]
on 14 Dec 2010 at 10:01
from python-progressbar.
Still doesn't look like a large enough amount to worry about. If you're
actually running updates on the progress bar more than 432,900 times per second
than you've got a different problem ;)
Original comment by Wolphie
on 14 Dec 2010 at 10:08
from python-progressbar.
Done in
https://code.google.com/p/python-progressbar/source/detail?r=a00c6b7ca3c5a1cd7c3
8386e91bffde086607e3d
Please check if it's OK, if you can. Thanks.
Original comment by [email protected]
on 15 Dec 2010 at 3:30
- Changed state: Fixed
from python-progressbar.
It's working perfectly. Great patch!
Original comment by Wolphie
on 16 Dec 2010 at 7:01
from python-progressbar.
Related Issues (20)
- __slots__ fail in python 3.3 HOT 1
- Fails on empty iterables HOT 1
- Progress bar does not work in ipython notebook due to '\r' issued _after_ output string HOT 4
- 'Attributes' feature implemented HOT 2
- Support for IPython and fancy HTML progress bars in IPython notebook HOT 7
- python 3.3 import errors HOT 8
- Attribute error with empty list
- Progressbar signal handler for SIGWINCH causes system calls to be interrupted HOT 2
- fix a missing typo with sys.stdout
- Update progressbar without printing newline
- Include Changelog.yaml in the released tarballs
- Feature Request: Progressbar for collections and iterators of fixed size
- Your own examples don't run HOT 2
- Using ProgressBar as iterator from empty iterable causes traceback HOT 1
- How to use adaptiveETA when execution time is unknown?
- Division by zero in `ProgressBar.percentage`
- I cant get progressbar worked
- feature request: delete progressbar when finished
- Update PyPI
- Cannot install with pip HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-progressbar.