[issue34128] Release GIL periodically in _pickle module

2019-05-10 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +pierreglaser ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue34128] Release GIL periodically in _pickle module

2018-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: CPU = Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz Ubuntu 18.04 Linux 4.15.0 x86_64 gcc 7.3.0 Performing the check in save() can have not insignificant overhead (especially after implementing the issue34141 optimization). It can be reduced if perform it when

[issue34128] Release GIL periodically in _pickle module

2018-07-17 Thread ppperry
Change by ppperry : -- nosy: -ppperry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue34128] Release GIL periodically in _pickle module

2018-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Interesting, which kind of computer / system / compiler are you on? -- ___ Python tracker ___ ___

[issue34128] Release GIL periodically in _pickle module

2018-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The demo script shows around 8% slowdown to me for data = list(map(float, range(N))) -- ___ Python tracker ___ ___

[issue34128] Release GIL periodically in _pickle module

2018-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: (as the demo script shows, there is no detectable slowdown) -- ___ Python tracker ___ ___ Python-

[issue34128] Release GIL periodically in _pickle module

2018-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Attaching demonstration script. -- Added file: https://bugs.python.org/file47701/pickle_gil.py ___ Python tracker ___ ___

[issue34128] Release GIL periodically in _pickle module

2018-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Attaching proof-of-concept patch. -- keywords: +patch Added file: https://bugs.python.org/file47700/pickle_gil.patch ___ Python tracker ___ _

[issue34128] Release GIL periodically in _pickle module

2018-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: The right way to do this is not to pass a timeout parameter but to check for GIL interrupts as done in the main bytecode evaluation loop. -- ___ Python tracker

[issue34128] Release GIL periodically in _pickle module

2018-07-17 Thread Martin Bammer
Martin Bammer added the comment: Maybe an optional parameter with the desired interval would be good idea. So that the coder can decide if he wants/needs that feature and which interval he needs for his application. Otherwise it is hard to define a specific interval which fits for everyone.

[issue34128] Release GIL periodically in _pickle module

2018-07-17 Thread ppperry
Change by ppperry : -- components: +Library (Lib) title: Do not block threads when pickle/unpickle -> Release GIL periodically in _pickle module ___ Python tracker ___ ___