Comments (2)
LOL. I had some fun making a start on this. Check my dexml branch (https://github.com/gvissers/Eternal-Lands/tree/dexml) if you want to play.
Anyway, I thought I'd try to start by converting the XML to C code, which is then compiled into the executable directly. It saves the hassle of having to write import functions, and since we're dealing with text files it is much easier to debug. Optimistically I started with the actor definitions. Well, nearly two weeks and 200,000 lines of generated code later, I'm happy to say that the process worked. Of course the default (debug) build ballooned from 3.2M to 21M, and the overall speedup of the boot process is questionable, but it works.
So here's some numbers, five runs, all wall clock time. The time spent in init_actor_defs is indeed nearly halved.The variances in the overall boot time are much greater than any potential savings though. (well, I did only test it on my latop, which is reasonably fast and has an SSD. YMMV).
Actor defs parsed at runtime, default build:
Size of executable: 3.2M
init_actor_defs: 0.358 0.356 0.358 0.355 0.351
init_stuff: 1.687 1.211 1.613 1.656 1.255
avg init_actor_defs: 0.36s
Actor defs compiled in, default build
Size of executable: 21M
init_actor_defs: 0.165 0.166 0.181 0.207 0.177
init_stuff: 1.422 1.679 0.953 1.023 1.435
avg init_actor_defs: 0.18s
Actor defs parsed at runtime, release build:
Size of executable: 2.9M
init_actor_defs: 0.324 0.374 0.336 0.320 0.322
init_stuff: 1.414 1.026 1.005 1.161 1.115
avg init_actor_defs: 0.34s
Actor defs compiled in, release build
Size of executable: 7.9M
init_actor_defs: 0.151 0.140 0.160 0.153 0.144
init_stuff: 1.172 0.720 0.825 0.758 0.742
avg init_actor_defs: 0.15s
Anyway, now that I've hashed out how to store the data, I can more easily come up with a binary file format. For the encyclopedia we probably want to do this anyway, since I've just realized that that's 14M of XML data (as opposed to just 600K for the actor defs, though the latter includes a lot of its files multiple times for different actor types).
from eternal-lands.
from eternal-lands.
Related Issues (20)
- Can we remove UVP: 1 now? HOT 7
- Android merge HOT 4
- Wacky backface culling HOT 15
- "letter box" (S H P M R A) unwantedly moves in certain conditions HOT 3
- Map Editor: Self Lit Object Function doesn't show preview in editor HOT 21
- Last harvest for Xaquelina or Elle quest does not show up in counters HOT 1
- Higher than max ethereal points can result in a overflow of the mana bar
- Client thinks there was a click when pressing the Meta key HOT 3
- Green watery gunk becomes regular water when reflections on HOT 5
- Weird shadows
- Problem with actor list lock (allowing to attack horses) HOT 1
- Suggest: Stop harvesting on start of Green Day
- Big Enhancement for 1.9.7: Ending the You Are Too Far Away nightmare
- Major: Rooms vanish in specific indoor c2 maps HOT 4
- Disabling display of all names, bars over entities makes it difficult to re-enable HOT 4
- Automatic attempts to reconnect after a grue
- Updates to Linux Makefile (maybe others) needed HOT 4
- Remove duplicates in posting history... Ctrl-Up (Suggestion)
- Macos build action fails with macos-latest (now 14) HOT 1
- Git submodules for EL data and encyc? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eternal-lands.