Skip to content

Commit c07dae2

Browse files
committed
Adding LuaJIT instructions to README
1 parent 29a923c commit c07dae2

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,36 @@ null backend for testing. For flexibility a new [multi](docs/multi.md)
172172
backend is also available which allows the configuration of custom
173173
PostgreSQL tables instead of those provided in the pgsql backend.
174174

175+
## LuaJIT support ##
176+
177+
To speed up Lua tag transformations, [LuaJIT](http://luajit.org/) can be optionally
178+
enabled on supported platforms. Performance measurements have shown about 25%
179+
runtime reduction for a planet import, with about 40% reduction on parsing time.
180+
181+
On a Debian or Ubuntu system, this can be done with:
182+
183+
```sh
184+
sudo apt install libluajit-5.1-dev
185+
```
186+
187+
Configuration parameter `WITH_LUAJIT=ON` needs to be added to enable LuaJIT.
188+
Otherwise make and installation steps are identical to the description above.
189+
190+
```sh
191+
cmake -D WITH_LUAJIT=ON ..
192+
```
193+
194+
Use `osm2pgsql --version` to verify that the build includes LuaJIT support:
195+
196+
```sh
197+
./osm2pgsql --version
198+
osm2pgsql version 0.96.0 (64 bit id space)
199+
200+
Compiled using the following library versions:
201+
Libosmium 2.15.0
202+
Lua 5.1.4 (LuaJIT 2.1.0-beta3)
203+
```
204+
175205
## Contributing ##
176206

177207
We welcome contributions to osm2pgsql. If you would like to report an issue,

0 commit comments

Comments
 (0)