Skip to content

Fix path used for board download - #34

Closed
iblech wants to merge 3 commits into
lovasoa:masterfrom
iblech:patch-1
Closed

Fix path used for board download#34
iblech wants to merge 3 commits into
lovasoa:masterfrom
iblech:patch-1

Conversation

@iblech

@iblech iblech commented Apr 22, 2020

Copy link
Copy Markdown
Contributor

Most places in the code reference the server-data directory as __dirname/../server-data. There is a single occurrence where it is referenced directly as ./server-data.

This pull request harmonizes the usage, so that all references are indirect via __dirname.

(I noticed this when packaging WBO for NixOS. There we need to decouple the server-data directory from the directory where the source files are stored, as the latter directory is readonly in NixOS. In the future, this decoupling could be an option for WBO; meanwhile, a simple sed patch gets the job done.)

@lovasoa

lovasoa commented Apr 22, 2020

Copy link
Copy Markdown
Owner

Thank you for finding and reporting that @iblech !

I fixed it, and the persistence folder can now be configured with the WBO_HISTORY_DIR environment variable.

@iblech

iblech commented Apr 22, 2020

Copy link
Copy Markdown
Contributor Author

Awesome, thank you for the proper fix! :-)

lovasoa added a commit that referenced this pull request Apr 20, 2026
Collapse duplicated SVG/XML escape helpers into one shared module.

The writer now emits numeric entities only (" & ' < >), while the reader still accepts legacy named entities during the transition. This removes duplicated escape/unescape logic and folds decoded text-length handling onto the same entity table.

Net diff in touched modules:
- server/stored_svg_item_codec.mjs: -75 lines
- server/svg_envelope.mjs: -36 lines

Validation:
- npm run typecheck
- node --test test-node/stored_svg_item_codec.test.js test-node/svg_board_store.test.js
- npm test
- npm run lint
- npm run profile

Profile after change:
- server broadcast throughput: 74.7 ms
- load large board: 182.7 ms
- persist modifications to large board: 240.0 ms
- open large board to peer-visible erase: 695.9 ms (single-sample)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants