![]() |
#31 |
master of fugue
Join Date: Jun 2007
Posts: 2,453
![]() ![]() ![]() ![]() ![]() |
![]() Noobster.
__________________And please learn to use vJass properly: debug call BJDebugMsg("TimerUtils_redInit: Failed a initializing attempt") debug call BJDebugMsg(SCOPE_PREFIX+"redInit: Failed a initializing attempt") |
![]() |
![]() |
Sponsored Links - Login to hide this ad! |
|
![]() |
#32 |
Free Software Terrorist
Technical Director
|
![]() I don't plan changing the name of the library, thank you very much, it is just a debug message anyway.
__________________ |
![]() |
![]() |
![]() |
#33 |
Brahms-fan
Join Date: Jan 2006
Posts: 642
![]() ![]() ![]() ![]() |
![]() If you want to avoid redinit contributing to op limit in main thread, you could use ExecuteFunc for it. Does anybody attach stuff to timers at map init anyway?
__________________ |
![]() |
![]() |
![]() |
#34 |
Free Software Terrorist
Technical Director
|
![]() Library initializers are called by ExecuteFunc.
__________________ |
![]() |
![]() |
![]() |
#35 |
Brahms-fan
Join Date: Jan 2006
Posts: 642
![]() ![]() ![]() ![]() |
![]() Ah... I must have looked at scopes' InitTrigs instead of libraries' initializers when I checked the generated code. My bad.
__________________ |
![]() |
![]() |
![]() |
#36 | |
User
Join Date: Oct 2006
Posts: 1,490
![]() |
![]() Quote:
We can safely change the constant QUANTITY under 8192 ? I don't think someone would need more than 256 timer on the same time anyway, that's just a question. |
|
![]() |
![]() |
![]() |
#37 |
Free Software Terrorist
Technical Director
|
![]() yes.
__________________ |
![]() |
![]() |
![]() |
#38 |
Rehabbing
|
![]() though is there a really point to doing so?
__________________Last edited by emjlr3 : 11-03-2008 at 08:31 PM. |
![]() |
![]() |
![]() |
#39 |
User
Join Date: Oct 2006
Posts: 1,490
![]() |
![]() Just a question, in the function NewTimer (red favor) if i set an integer instead of use two times this :
__________________![]() H2I(tT[0])-OFFSET I ask it because sometimes i need no periodic timers with 0 timeout (for an other thread). And because i might use it in a short periodic timer, a less execution time is good to take. But maybe it is totally irrelevant compare to the function NewTimer calling. |
![]() |
![]() |
![]() |
#40 |
Free Software Terrorist
Technical Director
|
![]() yes it would be faster.
__________________However, it is not really a big improvement. |
![]() |
![]() |
![]() |
#41 |
Corkscrew Chainsaw!!!
|
![]() I thought the whole idea of Red Timers was Speed > Sanity?
__________________ |
![]() |
![]() |
![]() |
#42 |
Free Software Terrorist
Technical Director
|
![]() But put it in context, if NewTimer is your bottle neck then you are probably calling it too much. Not to mention that all the stuff inside that if (tN==0) then should not be evaluated often at all, tN==0 should be the exception, not the rule, if you add an integer local it will have to be declared before that if block, and the allocating of the variable is probably going to make it slower most of the time, not like it matters...
__________________ |
![]() |
![]() |
![]() |
#43 |
Free Software Terrorist
Technical Director
|
![]() Your system is not unlimited - you have an implicit limit there, only that it will show itself in the form of collisions (mysterious bugs that would appear once you hit the limit), it certainly isn't faster either, in fact Red TimerUtils are much faster than it cause they get inlined.
__________________ |
![]() |
![]() |
![]() |
#44 | |
User
Join Date: Apr 2008
Posts: 191
![]() |
![]() hmm they have limit if you do not flush them that is ofc, but if you do! then they are unlimited. But in red (Timer Utils) even if you flush them there will be limit. Which is ofc hard to reach, but that hard to reach generates a lot of global variables (size/JASS_MAX_ARRAY_SIZE) i think thats the number. I did not understand the part that they have mysterious bugs. Ok ill explain how my system works!
Every handle has its own id! Every next generated object has id+1. If we know that and max size of array which is from 0 to 8191 not 8192. Then (object id mod 8192) = somewhere in the range from 0 to 8191 mod will never return 8192. Now when we have that id we can store it. For next id+1 it will store in array+1. It does not matter where (at which) id they start, because they loop and yes you are right they will not work if you store 8191 objects (example at id of 1000) -> you store object then it goes to 8191 -> loops to 0 -> goes to 999 and next one will not be stored. Why because you did not flush them. Quote:
If thet is true so my are not inlined well for that part your might be faster, but such long variables list use functions? so are they inlined if they are then lol using array more then 8191 is ok with me sorry did not know that array gets inlined. And ofc because my dont get inlined, but still are you sure that my system is so bad as you said, and that your is so good. I never said yours bad, i just got an idea on how to make my own stuff... However i never wanted that anyone uses my stuff, but i am interested a lot in learning stuff. So please explain me how this mysterious bugs happen and how is this not unlimited if you flush it? Please only answer on that Thank you! |
|
![]() |
![]() |
![]() |
#45 |
I blink, therefore I am.
Join Date: Sep 2006
Posts: 1,812
![]() ![]() ![]() ![]() |
![]() The problem exists, Dark_Dragon, when handle indexes are never released and they slowly start climbing. What will happen is that you may have a handle that gets the same storage index as a previously stored handle that is still in use. When this happens, you will over-write the index and cause the first handle to bug. Stuff like this is rather disgusting to debug and would rather be avoided.
__________________ |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
|