PDA

View Full Version : MAX odd behavior.


denisT
06-24-2011, 06:40 PM
i found very odd behavior of 3ds max during node creation. the behavior varies from max version and system version. could you run my test please, and give your numbers, max version, and windows version (and optionally - type of license ;)). the hardware doesn't matter.

(
delete objects
gc()
t1 = t0 = timestamp()
m1 = m0 = heapfree
count = 5000
format "BEGIN...\n"
for k=1 to count do
(
n = box() --name:("b" + k as string)
if (mod k 1000) == 0 do (format "\tnodes:%\ttime:%\tmemory:%\n" k (timestamp()-t1) (m1 - heapfree); t1 = timestamp(); m1 = heapfree)
)
format "CREATED...\n\tnodes:%\ttime:%\tmemory:%\n" count (timestamp() - t0) (m0 - heapfree)

completeRedraw()
gc()
ok
)


please run this test without defining the name of a box, and with defining.
thank you.

jonadb
06-24-2011, 06:49 PM
no name:
BEGIN...
nodes:1000 time:180 memory:151576L
nodes:2000 time:173 memory:136128L
nodes:3000 time:175 memory:136120L
nodes:4000 time:176 memory:137704L
nodes:5000 time:175 memory:136568L
CREATED...
nodes:5000 time:911 memory:698504L
OK

with name:
BEGIN...
nodes:1000 time:613 memory:1286544L
nodes:2000 time:1158 memory:1246672L
nodes:3000 time:2023 memory:-2488096L
nodes:4000 time:2428 memory:1285992L
nodes:5000 time:3093 memory:1247448L
CREATED...
nodes:5000 time:9337 memory:2578968L
OK

What the.. adding a name takes a lot of time!

Max2012 SP1 x64, Vista64, standalone permanent license.

JHN
06-24-2011, 07:11 PM
Lol, I have the opposite

*No Name*
BEGIN...
nodes:1000 time:666 memory:137112L
nodes:2000 time:1823 memory:136312L
nodes:3000 time:3112 memory:136160L
nodes:4000 time:4471 memory:136232L
nodes:5000 time:5655 memory:137312L
CREATED...
nodes:5000 time:15733 memory:683528L
OK

*With Name*
BEGIN...
nodes:1000 time:269 memory:1239872L
nodes:2000 time:453 memory:1220768L
nodes:3000 time:803 memory:1219488L
nodes:4000 time:1093 memory:1217872L
nodes:5000 time:1351 memory:1217984L
CREATED...
nodes:5000 time:3983 memory:6116384L
OK


max 2010 - x64/win7 - standalone

With name is faster here.. ran it multiple times, same result... what gives...

Pacermike
06-24-2011, 07:17 PM
Windows XP 2002 SP3; Max 9 SP2

NO NAME:

BEGIN...
nodes:1000 time:1031 memory:71440L
nodes:2000 time:2219 memory:68680L
nodes:3000 time:3656 memory:68528L
nodes:4000 time:5219 memory:69156L
nodes:5000 time:6812 memory:68064L
CREATED...
nodes:5000 time:18937 memory:346072L
OK

WITH NAME:

BEGIN...
nodes:1000 time:625 memory:591244L
nodes:2000 time:765 memory:521396L
nodes:3000 time:875 memory:520064L
nodes:4000 time:1172 memory:520064L
nodes:5000 time:1375 memory:520064L
CREATED...
nodes:5000 time:4812 memory:2673036L
OK

denisT
06-24-2011, 07:19 PM
here is my numbers:

* no name:
BEGIN...
nodes:1000 time:579 memory:138264L
nodes:2000 time:1554 memory:136272L
nodes:3000 time:2600 memory:136120L
nodes:4000 time:3655 memory:136120L
nodes:5000 time:4730 memory:136120L
CREATED...
nodes:5000 time:13127 memory:683296L

* with name:
BEGIN...
nodes:1000 time:242 memory:1339832L
nodes:2000 time:297 memory:1216120L
nodes:3000 time:355 memory:1216120L
nodes:4000 time:411 memory:1216120L
nodes:5000 time:482 memory:1216120L
CREATED...
nodes:5000 time:1798 memory:6204712L


max 2010/64, win7, network

without name is slower. it makes sense. the system looks for unique name.
BUT IT CAN'T BE SO SLOW!

JHN
06-24-2011, 07:20 PM
2012 completely different results here:

*No Text*
BEGIN...
nodes:1000 time:134 memory:145752L
nodes:2000 time:131 memory:136120L
nodes:3000 time:136 memory:136120L
nodes:4000 time:135 memory:136120L
nodes:5000 time:140 memory:142544L
CREATED...
nodes:5000 time:688 memory:697056L
OK
*With Text*
BEGIN...
nodes:1000 time:478 memory:1351016L
nodes:2000 time:1256 memory:1250864L
nodes:3000 time:2160 memory:1240760L
nodes:4000 time:3351 memory:1240552L
nodes:5000 time:4180 memory:1240592L
CREATED...
nodes:5000 time:11433 memory:6324184L
OK



I think I know what the mayor slowdown in max2012 is about. There have been changes done to uniqueName routine on object creation, because of the implementation of 3 digits renaming and the prohibiting certain characters. I think that checking routine has become slower.

-Johan

denisT
06-24-2011, 07:35 PM
* no name
BEGIN...
nodes:1000 time:139 memory:146168L
nodes:2000 time:138 memory:136120L
nodes:3000 time:137 memory:136120L
nodes:4000 time:139 memory:136120L
nodes:5000 time:138 memory:139288L
CREATED...
nodes:5000 time:700 memory:694216L

* with name
BEGIN...
nodes:1000 time:436 memory:1341152L
nodes:2000 time:929 memory:1250192L
nodes:3000 time:1497 memory:1244208L
nodes:4000 time:2398 memory:1241752L
nodes:5000 time:2676 memory:1241048L
CREATED...
nodes:5000 time:7945 memory:6318752L


max 2012/64, win7, trial

using redraw ON/OFF, undo ON/OFF don't change this behavior dramatically.
clone, copy, instance methods give the similar numbers...
i have no idea how to make 50,000 nodes universally. it's an endless process on some machines.

Ruramuq
06-24-2011, 08:49 PM
BEGIN... *clean*
nodes:1000 time:123 memory:137080L
nodes:2000 time:125 memory:136176L
nodes:3000 time:123 memory:136120L
nodes:4000 time:123 memory:136136L
nodes:5000 time:125 memory:136240L
CREATED...
nodes:5000 time:624 memory:682152L
BEGIN...*with names*
nodes:1000 time:386 memory:1226632L
nodes:2000 time:870 memory:1220840L
nodes:3000 time:1435 memory:-1728760L
nodes:4000 time:1910 memory:1219784L
nodes:5000 time:2561 memory:-1728336L
CREATED...
nodes:5000 time:7166 memory:210560L

pre-creating all names
creating and appending all boxes to an array,
renaming using all appended, using all created names :

BEGIN...
CREATED...
nodes:5000 time:631 memory:2125472L

miauu
06-24-2011, 09:21 PM
-- name
BEGIN...
nodes:1000 time:1969 memory:68772L
nodes:2000 time:5531 memory:68080L
nodes:3000 time:9953 memory:68064L
nodes:4000 time:14563 memory:68064L
nodes:5000 time:19343 memory:68064L
CREATED...
nodes:5000 time:51359 memory:341248L

-- no name
BEGIN...
nodes:1000 time:922 memory:599184L
nodes:2000 time:1719 memory:592064L
nodes:3000 time:2375 memory:592064L
nodes:4000 time:3078 memory:592064L
nodes:5000 time:3750 memory:592064L
CREATED...
nodes:5000 time:11844 memory:2967644L
max 2009 SP1 32bit, Win XP Pro SP3, standalone

denisT
06-24-2011, 10:25 PM
Thank all you guys.
At least I know now that I'm not crazy and my max's settings don't effect the performance.
Max 2010 and 2012 work opposite for node creation with and without name. Type of license doesn't matter. Probably the Windows system doesn't effect too.

RGhost
06-25-2011, 05:35 AM
max 2011 sp2 x64 /win7 x64 (stand alone lic)



-- no name
BEGIN...
nodes:1000 time:188 memory:137480L
nodes:2000 time:171 memory:136296L
nodes:3000 time:169 memory:136336L
nodes:4000 time:166 memory:136144L
nodes:5000 time:170 memory:136592L
CREATED...
nodes:5000 time:869 memory:683248L

-- named

BEGIN...
nodes:1000 time:496 memory:1507936L
nodes:2000 time:1115 memory:1480120L
nodes:3000 time:1829 memory:1480120L
nodes:4000 time:2669 memory:1480120L
nodes:5000 time:3587 memory:1480120L
CREATED...
nodes:5000 time:9701 memory:7428816L


max 2012 sp1 x64 /win 7 x64 (-//-)

BEGIN...
OK
nodes:1000 time:168 memory:139192L
nodes:2000 time:159 memory:136120L
nodes:3000 time:162 memory:136120L
nodes:4000 time:162 memory:136120L
nodes:5000 time:160 memory:136120L
OK
CREATED...
nodes:5000 time:2160 memory:685168L
OK

BEGIN...
OK
nodes:1000 time:501 memory:1246744L
nodes:2000 time:1098 memory:1240120L
nodes:3000 time:1807 memory:1240120L
nodes:4000 time:2531 memory:1240120L
nodes:5000 time:3438 memory:1240120L
OK
CREATED...
nodes:5000 time:10725 memory:6208720L
OK

CGTalk Moderation
06-25-2011, 05:35 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.