minetest/minetest — pull request #581 by khonkhortisan (2013-03-30 22:08:49+00:00)
Title: Don't load menu textures every frame

test
`strace bin/minetest`
example of one frame
before
```
read(4, 0xa076c4, 4096) = -1 EAGAIN (Resource temporarily unavailable)
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/kyle", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
lstat("/home/kyle/src", {st_mode=S_IFDIR|0755, st_size=65536, ...}) = 0
lstat("/home/kyle/src/minetest", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/kyle/src/minetest/bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/kyle/src/minetest/textures", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/kyle/src/minetest/textures/base", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/kyle/src/minetest/textures/base/pack", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/kyle/src/minetest/textures/base/pack/menuheader.png", {st_mode=S_IFREG|0644, st_size=578, ...}) = 0
sched_yield() = 0
sched_yield() = 0
getpid() = 26660
clock_gettime(CLOCK_MONOTONIC, {873163, 673204305}) = 0
clock_gettime(CLOCK_MONOTONIC, {873163, 673236521}) = 0
poll([{fd=8, events=POLLIN|POLLPRI}], 1, 1000) = 1 ([{fd=8, revents=POLLIN|POLLPRI}])
ioctl(8, 0xc0104652, 0x7fff91f4af30) = 0
clock_gettime(CLOCK_MONOTONIC, {873163, 673366159}) = 0
clock_gettime(CLOCK_MONOTONIC, {873163, 673400942}) = 0
clock_gettime(CLOCK_MONOTONIC, {873163, 673428661}) = 0
clock_gettime(CLOCK_MONOTONIC, {873163, 673461448}) = 0
clock_gettime(CLOCK_MONOTONIC, {873163, 673493482}) = 0
clock_gettime(CLOCK_MONOTONIC, {873163, 673526042}) = 0
sched_yield() = 0
sched_yield() = 0
sched_yield() = 0
nanosleep({0, 16000000}, NULL) = 0
```
after
```
read(4, 0xa076c4, 4096) = -1 EAGAIN (Resource temporarily unavailable)
sched_yield() = 0
sched_yield() = 0
getpid() = 26293
clock_gettime(CLOCK_MONOTONIC, {873083, 976309642}) = 0
clock_gettime(CLOCK_MONOTONIC, {873083, 976636863}) = 0
poll([{fd=8, events=POLLIN|POLLPRI}], 1, 1000) = 1 ([{fd=8, revents=POLLIN|POLLPRI}])
ioctl(8, 0xc0104652, 0x7fff4b649fc0) = 0
clock_gettime(CLOCK_MONOTONIC, {873083, 977729992}) = 0
clock_gettime(CLOCK_MONOTONIC, {873083, 978079880}) = 0
clock_gettime(CLOCK_MONOTONIC, {873083, 978430750}) = 0
clock_gettime(CLOCK_MONOTONIC, {873083, 978853681}) = 0
clock_gettime(CLOCK_MONOTONIC, {873083, 979200123}) = 0
clock_gettime(CLOCK_MONOTONIC, {873083, 979525994}) = 0
sched_yield() = 0
sched_yield() = 0
sched_yield() = 0
nanosleep({0, 16000000}, NULL) = 0
```
Every frame, it was testing for the existence of menu textures (bg,clouds,footer,header,splash) after testing every directory above those textures, even when the disappearance of those textures didn't cause them to disappear from a running game.