Does the high CPU happen if you ref. a different class in the same file (Like CompressedImageData, or others.)? Can you use cProfile on that machine?
On Friday, November 27, 2015 at 6:25:47 PM UTC-6, Andrew York wrote: > > Thanks for trying that out, Leif. I get the same brief burst you describe > on all the laptops I've tried this on, only my desktop gives the continuous > high-CPU behavior. > > I agree, I'd love to take the "doctor's advice" and stop whatever mistake > I'm making, since the high CPU usage badly impacts my project. > > Of course, it would be nice to know what to change (python version, > python distro, pyglet version, OS, OS version, GPU, etc). So far, changing > hardware seems to work (I've only gotten the bug on one machine), but > changing software doesn't (different python versions and different pyglet > versions don't seem to make a difference on that machine, as described > above). Any further suggestions on what I might try would are greatly > appreciated. > > On Thursday, November 26, 2015 at 9:36:06 PM UTC-8, Leif Theden wrote: >> >> On my windows 8.1, python 3.4.3, latest pyglet, I do not get this issue. >> I did see a bump in CPU use, but it was short (1-2 seconds). I imagine >> that it is related to the regular expressions in the class that are >> compiled with the class, but I am not certain without profiling it on your >> system. >> >> >> https://bitbucket.org/pyglet/pyglet/src/531dca4475fd199d9097fc628614e68b8eeaa2ac/pyglet/image/__init__.py?at=default&fileviewer=file-view-default#__init__.py-624 >> >> This comes to mind: The patient says, "Doctor, it hurts when I do this." >> Doctor says: "Then don't do that!" >> >> It could be your non-standard python distribution, CPU, compilers flags, >> cosmic rays, or that you are using the interactive prompt to make the >> problem happen. Unless it happens under normal use (like running a pyglet >> app) and severely impacts your program, I don't see a problem here, IMO. >> >> On Sunday, November 22, 2015 at 2:32:53 PM UTC-6, Andrew York wrote: >>> >>> Hello, I'm new to the community, but I'm a very happy pyglet user for >>> some time now. I've asked a pyglet question on stack overflow: >>> >>> http://stackoverflow.com/questions/33833646/why-does-referring-to-a-class-in-python-pyglet-image-cause-heavy-cpu-load-on-w >>> It seems sensible to mention it here also. >>> >>> I'm not familiar with pyglet's internals, but I'm happy to do what I can >>> to help answer this question. >>> >>> Thanks for making this excellent project. >>> >> -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
