Skip to content

Commit dfe4d58

Browse files
committed
Small documentation tweaks
1 parent 86526a9 commit dfe4d58

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ microcontroller with Arduino support).
88
- For an overview, getting started, troubleshooting basic problem: **Continue reading on this page**
99
- More usage examples: The regular [examples folder](/examples)
1010
- All functions / classes: [full API reference](https://tfry-git.github.io/EmbAJAX/api/annotated.html)
11-
- Tweaking RAM, flash, and network usage, understanding internal workings: [Library design considerations](/docs/Technical.md)
11+
- Tweaking RAM, flash, and network usage, understanding internal workings: [Technical details](/docs/Technical.md)
1212

1313
## Overview
1414

docs/Technical.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
# Technical background / tweaking performance and resource usage
1+
# Technical details and performance tweaks
2+
3+
## RAM vs. Flash
4+
5+
On some MCU-architectures, RAM and FLASH reside in two logically distinct address spaces. This implies that regular const char* strings
6+
need to be copied into RAM address space, even if they are fully static. EmbAJAX needs many string constants, and is therefore quite affected
7+
by this problem.
8+
9+
The Arduino F() macro helps to work around this (further reading, there), but does incur a small performance (and code size) penalty, which can
10+
be avoided if a) RAM usage is not an issue, or b) the MCU uses a unified address space.
11+
12+
By default, EmbAJAX tries to detect case b), and will disable use of F() strings, then. The USE_PROGMEM_STRINGS define near the top of EmbAJAX.h
13+
allows you to tweak this for special needs.
14+
15+
Note that at the time of this writing, there is no distinct support for keeping ```EmbAJAXStatic``` blocks in PROGMEM. Pull requests are welcome.
216

317
## Latency vs. network traffic vs. performance
418

@@ -37,20 +51,6 @@ To avoid sending all states of all controls on each request from each client, th
3751
sent to any client. The client pings back its current revision number on each request, so only real changes have to be forwarded. This is particularly
3852
important where several clients are accessing the same page, and need to be kept in sync.
3953

40-
## RAM vs. Flash
41-
42-
On some MCU-architectures, RAM and FLASH reside in two logically distinct address spaces. This implies that regular const char* strings
43-
need to be copied into RAM address space, even if they are fully static. EmbAJAX needs many string constants, and is therefore quite affected
44-
by this problem.
45-
46-
The Arduino F() macro helps to work around this (further reading, there), but does incur a small performance (and code size) penalty, which can
47-
be avoided if a) RAM usage is not an issue, or b) the MCU uses a unified address space.
48-
49-
By default, EmbAJAX tries to detect case b), and will disable use of F() strings, then. The USE_PROGMEM_STRINGS define near the top of EmbAJAX.h
50-
allows you to tweak this for special needs.
51-
52-
Note that at the time of this writing, there is no distinct support for keeping ```EmbAJAXStatic``` blocks in PROGMEM. Pull requests are welcome.
53-
5454
## Some further implementation notes
5555

5656
Concurrent access by an arbitrary number of separate clients is the main reason behind going with AJAX, instead of WebSockets, even if the

0 commit comments

Comments
 (0)