Fancy logo
Yadex $VERSION ($SOURCE_DATE)

Advanced user's guide

Under a silly name, this document discusses some issues that only "advanced" users might want to know about. If you're a new user, you can probably skip this document for the moment.



Scalability

Level size

Very large levels, that is levels with large numbers of things, vertices, linedefs, sidedefs or sectors, affect both memory consumption and responsiveness.

Wad size

Since the directory of all loaded wads is kept in memory all the time, in pathological cases this could cause trouble. However, I don't think the problem could arise in practice as even the biggest wads have directories no larger than about 100 kB.

Wads with a large number of entries tend to cause delays because loading them generates several screenfuls of messages. I've made those load-time messages much more compact than they used to be but there's still enough left to be annoying with certain megawads. And, no, there's no way to suppress them (I mean the messages <g>).

If and when in-place saving is ever implemented, there'll be something to say about it here.

Window size

In the present implementation, the window is probably the worst memory and CPU hog. Unless the -P option is used, a pixmap is created for the window. For large window sizes, that pixmap can be quite large. For example, for a 1024×768 window on a 16-bit display, it would be about 1.5 MB large.

On the CPU side, every times the screen is redrawn completely (which happens quite often, particularly when dragging objects), the pixmap is filled with black and then blitted back to the frame buffer. In the above example, that amounts to reading or writing no less than about 4.5 million bytes for every refresh. This alone could explain why Yadex becomes so sluggish when the window size grows.

I plan to remove the pixmap completely and always display directly onto the window, like is done when -P is given. That would eliminate the need for the blitting step, which would cut two thirds of the load. What's more, I strongly suspect that clearing and drawing to a window is significantly faster than doing the same with a pixmap (because the X server typically can't use the video hardware on pixmaps). The problem is doing that in a flicker-free fashion.

How Yadex deals with wad files

Yadex keeps the iwad open for the whole duration of the Yadex session. The iwad is closed only when Yadex exits. Pwads are kept open as long as they are loaded. A pwad is closed only when another pwad with exactly the same resources is loaded or, if it contains only a level, when that level is saved.

The wad files are opened with a simple fopen(). Yadex make no attempt to control the locking. However, even though it would probably be possible for another process to open a file while Yadex keeps it open, it would nontheless be a bad idea.

For more high-level information on how Yadex treats wad files, see there.


AYM $SELF_DATE