# Speed Improvments for Note Construction JAdd

**URL:** <https://discuss.blues.com/t/speed-improvments-for-note-construction-jadd/280>\
**Category:** Firmware\
**Created:** [May 31, 2021, 7:39pm UTC](https://discuss.blues.com/t/speed-improvments-for-note-construction-jadd/280 "2021-05-31T19:39:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shonky2](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@shonky2](https://discuss.blues.com/u/shonky2)\
**Post date:** [May 31, 2021, 7:39pm UTC](https://discuss.blues.com/t/speed-improvments-for-note-construction-jadd/280/1 "2021-05-31T19:39:22Z")

</div>

Hello,

Is there anyway to improve the speed to process the json object for a note add? The note we are sending has 18 JAddStringToObject to the body and I’ve seen this take approximately 2 seconds to complete on an ESP32. It seems to be related to the time for it to process the JAddString because when we comment some of them out it gets faster. Speed is key because the user is waiting for the note.add to complete.

I appreciate any ideas or methods of creating the json object faster.

Thank you!

Sincerely,  
Matt

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [June 1, 2021, 1:14pm UTC](https://discuss.blues.com/t/speed-improvments-for-note-construction-jadd/280/2 "2021-06-01T13:14:00Z")

</div>

Hi @shonky2 ,

Can you please provide a code sample so we can take a closer look? It definitely shouldn’t take that long to complete so hopefully we can help debug this.

Thanks,  
Rob

---

<div class="post-metadata">

**Author:** ![shonky2](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@shonky2](https://discuss.blues.com/u/shonky2)\
**Post date:** [June 1, 2021, 1:30pm UTC](https://discuss.blues.com/t/speed-improvments-for-note-construction-jadd/280/3 "2021-06-01T13:30:58Z")

</div>

Hey @RobLauer,

I just sent you a message with the code. Thank you!

Sincerely,  
Matt

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [June 1, 2021, 4:40pm UTC](https://discuss.blues.com/t/speed-improvments-for-note-construction-jadd/280/4 "2021-06-01T16:40:46Z")

</div>

@shonky2 we ran some tests internally and were not able to replicate any issues with the `JAddStringToObject` method. I’ll send you the `.ino` file we used for testing (using I2C on a Notecarrier-AF) so you can see what was done. Basically the tests showed it took \< 1ms to run.

However, we had to make up our own string values for testing. If you could send some real world data that might help as well.

---

<div class="post-metadata">

**Author:** ![shonky2](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@shonky2](https://discuss.blues.com/u/shonky2)\
**Post date:** [June 1, 2021, 5:27pm UTC](https://discuss.blues.com/t/speed-improvments-for-note-construction-jadd/280/5 "2021-06-01T17:27:03Z")

</div>

Hi @RobLauer,

Thank you for sending over. We’ll review and I’ll follow up. I appreciate all of your help!

Sincerely,  
Matt

---

<div class="post-metadata">

**Author:** ![gwolff](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@gwolff](https://discuss.blues.com/u/gwolff)\
**Post date:** [June 30, 2021, 4:39pm UTC](https://discuss.blues.com/t/speed-improvments-for-note-construction-jadd/280/6 "2021-06-30T16:39:11Z")

</div>

I think this is related to some delay baked into the communication library to talk to Notecard. It is pretty conservative. We are reviewing this right now to see if we can reduce those delays.
