Side effect of sourcing the same spray route multiple times

39 views
Skip to first unread message

Amrit Jyoti Baruah

unread,
Feb 26, 2015, 5:02:01 AM2/26/15
to spray...@googlegroups.com
Hi Experts,

Is there any side effect if I source the same spray path multiple times in the runRoute method. For example -

 def receive = runRoute(myRoute ~ myRoute ~ myRoute ~ myRoute )

Regards,
Amrit

Jim Hazen

unread,
Feb 26, 2015, 11:41:15 AM2/26/15
to spray...@googlegroups.com
You'll take x times longer to fail in the failure case. You'll also likely allocate additional memory. I wouldn't expect much runtime impact when completing normally though.

That said, why not just not do that?

Amrit Jyoti Baruah

unread,
Feb 27, 2015, 8:46:13 AM2/27/15
to spray...@googlegroups.com
Thanks Jim. Yeah let me try to avoid that in that case.

Regards,
Amrit

Mathias Doenitz

unread,
Mar 2, 2015, 3:41:22 AM3/2/15
to spray...@googlegroups.com
Amrit,

it’s legal, but I wouldn’t know why you’d want to do it.
Whatever the reason, it looks fishy.

Can you elaborate as to your purpose with this?

Cheers,
Mathias

---
mat...@spray.io
http://spray.io
> --
> You received this message because you are subscribed to the Google Groups "spray.io User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to spray-user+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/spray-user.
> To view this discussion on the web visit https://groups.google.com/d/msgid/spray-user/5f62fd82-07fe-4c58-af1f-daa44e378179%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages