# Subscribing write

**URL:** <https://forum.inductiveautomation.com/t/subscribing-write/9984>\
**Category:** Module Development\
**Created:** [May 5, 2015, 7:47pm UTC](https://forum.inductiveautomation.com/t/subscribing-write/9984 "2015-05-05T19:47:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [May 5, 2015, 7:47pm UTC](https://forum.inductiveautomation.com/t/subscribing-write/9984/1 "2015-05-05T19:47:14Z")

</div>

Hi,

If I want to write to the same set of tags defined using writepaths.add method defined only once and only their values will change every time I write. How can I achieve it? Presently I have to create the write-paths including their values every time and then call the write method.

writepaths.add(new BasicAsyncWriteRequest(TagPathParser.parse(...the Tag-path string...),value string);

How can I reuse the same tagpath list once defined only onced and only changing its values?

regards  
PRAMANJ

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [July 22, 2015, 5:46pm UTC](https://forum.inductiveautomation.com/t/subscribing-write/9984/2 "2015-07-22T17:46:54Z")

</div>

Hi Kevin,

I hope you understood my problem and requirement? The writepaths.add method requires creation of list of tags along with their values every time I want to write new values from my module to Ignition server. If my list of tags are fixed and only I have to update their values cyclically is there any seperate API available for write? My worry is it would be wasteful of cpu time and garbage collection to recreate the same list of TagPaths using the follwing API. If I could only update the values for the list created only once.

writepaths.add(new BasicAsyncWriteRequest(TagPathParser.parse(...the Tag-path string...),value string);

I would appreciate your early reply to my query. Please let me know if my double is clear to you or I am imagining a problem?

regards  
PRAMANJ

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 22, 2015, 6:04pm UTC](https://forum.inductiveautomation.com/t/subscribing-write/9984/3 "2015-07-22T18:04:16Z")

</div>

There’s no separate API.

I don’t think what you’re doing isn’t as wasteful as you’re imagining it to be, just carry on ![:thumb_right:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/2026e28c0c425034352c1b75807edf956adc75f4.gif ":thumb\_right:")

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [July 23, 2015, 4:05am UTC](https://forum.inductiveautomation.com/t/subscribing-write/9984/4 "2015-07-23T04:05:36Z")

</div>

Dear Kevin,  
Thanks, let me first go ahead in this way then we will see if there is any performance issue. I am always apprehensive or paranoid about repetitive memory allocation and relying totally on JVM to do the garbage collection, lest it should lead to memory leaks! I try to avoid Garbage generation as far as possible!

Let me corss the bridge when I come to the it.

best regards  
PRAMANJ
