Jump to content

Python for loop Slow (Problem)


Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Bot

At first: Idk. what the variable "o" stands for, but if you have to do a for-loop in range(-400000, 400000) you're probably messing something logically up.

On the other hand, if you REALLY need such a big range, use clusters to split you're long list into short ones and then iterate with threads through these lists, use a while-loop, that only executes for the neccesary fields, which you have to check somehow or use a generator, which won't save the list, but which can theoratically generate infinite values for you, which you could use.

 

I hope I could help a bit or give you some ideas.

 

King Regards

Cyber

english_banner.gif

Link to comment
Share on other sites

13 hours ago, Cyber36 said:

At first: Idk. what the variable "o" stands for, but if you have to do a for-loop in range(-400000, 400000) you're probably messing something logically up.

On the other hand, if you REALLY need such a big range, use clusters to split you're long list into short ones and then iterate with threads through these lists, use a while-loop, that only executes for the neccesary fields, which you have to check somehow or use a generator, which won't save the list, but which can theoratically generate infinite values for you, which you could use.

 

I hope I could help a bit or give you some ideas.

 

King Regards

Cyber

o=player.GetMainCharacterIndex

 

I am scanning the distance of the character, It has to be 40k otherwise the scan may fail. I looked at the thread thread, but metin2 does not work I looked at the thread thread, but it does not work on metin2, how can we find a solution,Do you have a way of thinking?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.