project-navigation
Personal tools

Author Topic: Time to compile a map  (Read 5346 times)

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Time to compile a map
« on: March 29, 2009, 11:47:27 pm »
In build 23783, it takes almost 2 hours for this map

./ufo2map -nice 19 -extra -t 1 maps/./alienb/a_hangar.map
nice = 19
extrasamples = true
threads: #1
---- ufo2map 1.2.4 ----
path: 'maps/./alienb/a_hangar.map'

---- filesystem initialization -----
Adding game dir: /usr/local/lib/ufoai/base
Adding game dir: /usr/local/share/ufoai/base
Adding game dir: /Users/michael/.ufoai/2.3-dev/base
Adding game dir: ./base
using ./base for writing
...map: 'maps/./alienb/a_hangar.map'
...bsp: 'maps/./alienb/a_hangar.bsp'
entering maps/./alienb/a_hangar.map
     LEVEL: 0...1...2...3...4...5...6...7...8...9... (time:      2s, #: 258)
 UNITCHECK: 0...1...2...3...4...5...6...7...8...9... (time:     11s, #: 131072)
 CONNCHECK: 0...1...2...3...4...5...6...7...8...9... (time:    122s, #: 524288)
Writing maps/./alienb/a_hangar.bsp
  137 seconds elapsed
----- Lighting ----
124 direct lights for night lightmap
FACELIGHTS: 0...1...2...3...4...5...6...7...8...9... (time:   3354s, #: 1935)
FINALLIGHT: 0...1...2...3...4...5...6...7...8...9... (time:      2s, #: 1935)
 3357 seconds elapsed
124 direct lights for day lightmap
FACELIGHTS: 0...1...2...3...4...5...6...7...8...9... (time:   3519s, #: 1935)
FINALLIGHT: 0...1...2...3...4...5...6...7...8...9... (time:      3s, #: 1935)
 3522 seconds elapsed
writing maps/./alienb/a_hangar.bsp
sum:  7016 seconds elapsed - 1e+01 MB (10072404 bytes)

Can this map be simplified a bit?
1.42 G4 Mac 10.5.6

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: Time to compile a map
« Reply #1 on: March 29, 2009, 11:50:57 pm »
The compilation time is related to the recent changes in the tracing and routing code. It's not the map's fault.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Time to compile a map
« Reply #2 on: March 30, 2009, 02:52:21 pm »
Recently (days) I had 46 minutes compilation time on the same map with my AthlonXP 2000+ (1667Mhz) on Linux. I'm sure it isn't normal. I mentioned this to Duke he thought the problem is on my side ofc. :( Here is the proof he was wrong...

-geever

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: Time to compile a map
« Reply #3 on: May 09, 2009, 01:12:02 am »
@geever:
Sorry for suspecting your system :(
Back then I didn't know that certain maps take *very* long for the lighting (ie. 'FACELIGHTS')

The routing/pathfinding code ends after the 'CONNCHECK' pass (which doesn't take toooo long here).
Lighting stuff is Mattn's business afaik.

Could you plz come up with a log of the same map-compile with current trunk code ? (ie. how long does it take *now* ?)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Time to compile a map
« Reply #4 on: May 09, 2009, 07:07:43 am »
which reminds me - i still can't use the stairs in this map (though i haven't recompiled in the last days) - would be nice if you could test that please.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Time to compile a map
« Reply #5 on: May 09, 2009, 11:21:33 am »
@geever:
Could you plz come up with a log of the same map-compile with current trunk code ? (ie. how long does it take *now* ?)

Yeah, true, lighting takes much time but that's using traces no?
H*lly sh*t it's even worse now 70.5 mins...

Code: [Select]
$ time ./ufo2map -extra maps/alienb/a _hangar.map
extrasamples = true
---- ufo2map 1.2.4 ----
path: 'maps/alienb/a_hangar.map'

---- filesystem initialization -----
Adding game dir: /usr/local/lib/ufoai/base
Adding game dir: /usr/local/share/ufoai/base
Adding game dir: /home/geever/.ufoai/2.3-dev/base
Adding game dir: ./base
using ./base for writing
...map: 'maps/alienb/a_hangar.map'
...bsp: 'maps/alienb/a_hangar.bsp'
entering maps/alienb/a_hangar.map
Generated footstep file with 1 entries
     LEVEL: 0...1...2...3...4...5...6...7...8...9... (time:      1s, #: 258)
 UNITCHECK: 0...1...2...3...4...5...6...7...8...9... (time:      5s, #: 131072)
 CONNCHECK: 0...1...2...3...4...5...6...7...8...9... (time:     11s, #: 262144)
Writing maps/alienb/a_hangar.bsp
   19 seconds elapsed
----- Lighting ----
132 direct lights for night lightmap
FACELIGHTS: 0...1...2...3...4...5...6...7...8...9... (time:   2183s, #: 2417)
FINALLIGHT: 0...1...2...3...4...5...6...7...8...9... (time:      1s, #: 2417)
 2185 seconds elapsed
132 direct lights for day lightmap
FACELIGHTS: 0...1...2...3...4...5...6...7...8...9... (time:   2025s, #: 2417)
FINALLIGHT: 0...1...2...3...4...5...6...7...8...9... (time:      1s, #: 2417)
 2027 seconds elapsed
writing maps/alienb/a_hangar.bsp
sum:  4231 seconds elapsed - 1e+01 MB (10683928 bytes)


real    70m30.760s
user    43m49.924s
sys     0m9.601s

-geever

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Time to compile a map
« Reply #6 on: May 09, 2009, 12:27:25 pm »
Yeah, true, lighting takes much time but that's using traces no?

yes - indeed - and the lightmap code hasn't changed much recently. but even if the compile time is long, it's more important to get (oe keep) the tracing in-game at a reasonable speed. but i suppose that some lightmap related tracing is broken anyway - see e.g. the bunker map - the lightmap on the lower level is totally b0rked.