Sinisterly
Python Help please - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Python (https://sinister.li/Forum-Python)
+--- Thread: Python Help please (/Thread-Python-Help-please)

Pages: 1 2


Python Help please - ENCRYP73D_GH05T - 12-22-2021

Okay so i wrote my first Python script ever and im really new to it but

It runs perfectly fine on Linux but if i run it on windows it literally eats my Ram & CPU..

Any ideas of what could be causing this ?


RE: Python Help please - mothered - 12-23-2021

Perhaps post the code.

As such, members can view It and hopefully Identify the cause.


RE: Python Help please - Drako - 12-23-2021

Well, you should probably post the code first so we can see it. Either use a pasting service, or paste the code in your thread with a code block.


RE: Python Help please - convector - 12-23-2021

If you couldn't share it out of shyness, well I guess we cannot help you but an idea is that check out if there is "too much" array and data manipulation going on, and also check out if you are using the appropriate libraries and modules for windows.


RE: Python Help please - ENCRYP73D_GH05T - 12-23-2021

Once i removed hit_ratio and had to fix loop an adding a max thread limit

It stopped freezing my PC

@Drako

i apologize for not replying faster. i didn't even see the Notification till this morning
@convectorThank you for the possible fixes

Now i feel horrible for even asking :/ because the only reason it wasn't posted is that its part 1 of a program being sold. I guess i should've thought before i posted

Again i apologize


RE: Python Help please - convector - 12-23-2021

Nahh it's alright, I don't expect a very fast reply from you nor anyone from here since this is a forum, and its an open-board. Anyone can reply anytime they want or they can also not reply. Lol. Just kidding.

I believe the best way for you to deal with threading problem or whatsoever is not integrate it with C libraries or much better, don't use python and use a much better programming language that deals with threads and at the same time, you can play along and fast like a compiled language.

You can use C, C++ or Rust maybe? What do you think?


RE: Python Help please - ENCRYP73D_GH05T - 12-23-2021

(12-23-2021, 06:24 PM)convector Wrote: Nahh it's alright, I don't expect a very fast reply from you nor anyone from here since this is a forum, and its an open-board. Anyone can reply anytime they want or they can also not reply. Lol. Just kidding.

I believe the best way for you to deal with threading problem or whatsoever is not integrate it with C libraries or much better, don't use python and use a much better programming language that deals with threads and at the same time, you can play along and fast like a compiled language.

You can use C, C++ or Rust maybe? What do you think?

[Image: 30nDPKfl_t.png]


RE: Python Help please - ConcernedCitizen - 12-23-2021

Glad you fixed this but next time consider posting the code so someone can diagnose its issues. +1 for fixing compatibility so quickly because it sometimes takes me days to find problem functionality in my own code.


RE: Python Help please - ENCRYP73D_GH05T - 12-24-2021

(12-23-2021, 06:24 PM)convector Wrote: Nahh it's alright, I don't expect a very fast reply from you nor anyone from here since this is a forum, and its an open-board. Anyone can reply anytime they want or they can also not reply. Lol. Just kidding.

I believe the best way for you to deal with threading problem or whatsoever is not integrate it with C libraries or much better, don't use python and use a much better programming language that deals with threads and at the same time, you can play along and fast like a compiled language.

You can use C, C++ or Rust maybe? What do you think?

i know a little about C++ i just get mad quickly so it just pushes me back to the languages i know which is Java , JavaScript and some Bits of python mostly simple basics and a very small amount of C . which was all learned when i was way younger with alot less issues.. so i just mess around for fun to get away from the real world whenever i can .


RE: Python Help please - convector - 12-24-2021

(12-24-2021, 02:10 AM)ENCRYP73D_GH05T Wrote: i know a little about C++ i just get mad quickly so it just pushes me back to the languages i know which is Java , JavaScript and some Bits of python mostly simple basics  and a very small amount of C . which was all learned when i was way younger with alot less issues.. so i just mess around for fun to get away from the real world  whenever i can .

Oh okay, now I understand. If you can get out of your comfort-zone and start to work things even if its frustrating, at least you can get the job done according to your expectations since its a compiled language, and it can outperform python really well.

Sometimes, the most frustrating tasks that can be done but takes time have the most fruitful and rewarding outcome.