Ok, I've had this problem off and on, it seems that at certain times, delete object can be really slow, I've had some people record up to 100 milliseconds delete a triangle! Now I don't know about you, but it seems that deleting a triangle should take less time than does to create it, or at least should be down to about 1 milisecond at the most, I finaly managed to make a snippit that would show this, it might run different on other computers, but one of the oddest things I found about it is that making and deleteing triangles is SLOWER than making and deleteing the same number of boxes!! Anyways, decide for yourself:
`%ProjectTitle%
`======================
`©%Author%
`======================
`Main Source File
sync on
sync rate 0
global yangle as float
global startTime as integer
global totalTime as integer
global totalEntries as integer
totalEntries = 0
disable escapekey
if file exist("log.txt") then delete file "log.txt"
open to write 1, "log.txt"
autocam off
position camera 25,25,25
point camera 0,0,0
for n = 1 to 99
make object triangle n,10,10,10,0,0,0,0,-10,0
`make object box n, 5,5,5
rotate object n,0,wrapvalue(yangle+(360/25)*n),0
next n
repeat
center text screen width()/2, 25, "Press escape to exit"
center text screen width()/2, 40, str$(totalEntries) + " Entries Written"
center text screen width()/2, 55, "Screen FPS: " + str$(screen FPS())
`objects to be deleted and recreated every sync...
for n = 100 to 110
make object triangle n,10,10,10,0,0,0,0,-10,0
`make object box n, 5,5,5
next n
for n = 1 to 110
rotate object n,0,wrapvalue(yangle+(360/110)*n),0
next n
inc yangle, 0.25
sync
totalTime = 0
`notice that it only deletes 10 triangles!
for n = 100 to 110
startTime = timer()
delete object n
totalTime = timer() - startTime
if totalTime > 15
write string 1,"Delete object took " + str$(totalTime) + " Milliseconds..."
inc totalEntries
endif
next n
until escapekey() = 1
close file 1
execute file "log.txt","",get dir$(),0
end
CPU
[center]K-OS Battlefields
IS
///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\[center]