wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 08-19-2008, 07:45 PM   #31
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

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")
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 08-19-2008, 08:10 PM   #32
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

I don't plan changing the name of the library, thank you very much, it is just a debug message anyway.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 08-19-2008, 08:11 PM   #33
Themerion
Brahms-fan
 
Themerion's Avatar
 
Join Date: Jan 2006
Posts: 641

Submissions (2)

Themerion has a spectacular aura about (110)Themerion has a spectacular aura about (110)Themerion has a spectacular aura about (110)Themerion has a spectacular aura about (110)

Default

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?
__________________
Submissions::
(v)JASS Tutorial
Covers how to make fast and safe coding for common tasks in vJASS/JASS.
Creep Respawn System
It has never been easier to respawn creep groups...
Themerion is offline   Reply With Quote
Old 08-19-2008, 08:11 PM   #34
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Library initializers are called by ExecuteFunc.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 08-19-2008, 08:17 PM   #35
Themerion
Brahms-fan
 
Themerion's Avatar
 
Join Date: Jan 2006
Posts: 641

Submissions (2)

Themerion has a spectacular aura about (110)Themerion has a spectacular aura about (110)Themerion has a spectacular aura about (110)Themerion has a spectacular aura about (110)

Default

Ah... I must have looked at scopes' InitTrigs instead of libraries' initializers when I checked the generated code. My bad.
__________________
Submissions::
(v)JASS Tutorial
Covers how to make fast and safe coding for common tasks in vJASS/JASS.
Creep Respawn System
It has never been easier to respawn creep groups...
Themerion is offline   Reply With Quote
Old 11-01-2008, 10:47 AM   #36
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

Quote:
- However, Red flavor has a timer limit of 256, once you exceed this limit, it might fail to work.

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.
__________________
Cool != Useful
Troll-Brain is offline   Reply With Quote
Old 11-03-2008, 06:17 PM   #37
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

yes.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 11-03-2008, 07:31 PM   #38
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

though is there a really point to doing so?
__________________

Last edited by emjlr3 : 11-03-2008 at 07:31 PM.
emjlr3 is offline   Reply With Quote
Old 11-06-2008, 08:50 PM   #39
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

Just a question, in the function NewTimer (red favor) if i set an integer instead of use two times this :
Collapse JASS:
H2I(tT[0])-OFFSET
, should it be faster ?
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.
__________________
Cool != Useful
Troll-Brain is offline   Reply With Quote
Old 11-07-2008, 01:19 AM   #40
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

yes it would be faster.

However, it is not really a big improvement.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 11-07-2008, 01:24 AM   #41
Here-b-Trollz
Corkscrew Chainsaw!!!
 
Join Date: Jun 2006
Posts: 711

Here-b-Trollz has a spectacular aura about (149)

Hero Contest #2 - 2nd Place

Default

I thought the whole idea of Red Timers was Speed > Sanity?
__________________
By reading this signature, you agree that I cannot be held accountable for anything that I might say or do.
Here-b-Trollz is offline   Reply With Quote
Old 11-07-2008, 02:04 AM   #42
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

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...
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 11-21-2008, 09:50 PM   #43
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

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.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 11-25-2008, 10:24 AM   #44
Dark_Dragon
User
 
Dark_Dragon's Avatar
 
Join Date: Apr 2008
Posts: 189

Dark_Dragon has little to show at this moment (9)

Default

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:
Originally Posted by Vexorian
in fact Red TimerUtils are much faster than it cause they get inlined

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!
Dark_Dragon is offline   Reply With Quote
Old 11-25-2008, 02:21 PM   #45
Ammorth
I blink, therefore I am.
 
Ammorth's Avatar
 
Join Date: Sep 2006
Posts: 1,812

Submissions (10)

Ammorth is a glorious beacon of light (457)Ammorth is a glorious beacon of light (457)Ammorth is a glorious beacon of light (457)Ammorth is a glorious beacon of light (457)

Default

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.
__________________
Ammorth is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 01:29 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services