genie-toolkit
genie-toolkit copied to clipboard
Initializing a dialogue policy for new devices is slow
See log:
====
# main/2e3831ed-b3c5-40c1-bef7-2f469f79e394
#! timestamp: 2021-07-23T20:49:04.246Z
U: cancel
UT: $dialogue @org.thingpedia.dialogue.transaction.cancel;
C: $dialogue @org.thingpedia.dialogue.transaction.cancel;
#! timestamp: 2021-07-23T20:49:04.530Z
A: Alright, let me know if I can help you with anything else!
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_end;
====
# main/cddd2b9e-d5e1-4e0a-895d-a231bf81ccb1
#! timestamp: 2021-07-23T20:49:45.921Z
U: cancel
UT: $dialogue @org.thingpedia.dialogue.transaction.cancel;
C: $dialogue @org.thingpedia.dialogue.transaction.cancel;
#! timestamp: 2021-07-23T20:49:45.939Z
A: Alright, let me know if I can help you with anything else!
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_end;
The first time, the dialogue policy was reinitialized to empty from a different dialogue policy and it took 300ms (on top of everything else). The second time, the dialogue policy was the same and it was much faster.
Other log:
====
# main/548e61fd-88ad-444a-a3a3-5c7160a80ac9
#! timestamp: 2021-07-23T20:51:51.596Z
U: tell me a joke
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @com.icanhazdadjoke.get();
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: @com.icanhazdadjoke.get()
C: #[results=[
C: { id="4wciyk3EBAd"^^com.icanhazdadjoke:id, text="I got a reversible jacket for Christmas, I can't wait to see how it turns out." }
C: ]];
#! timestamp: 2021-07-23T20:51:52.043Z
A: I got a reversible jacket for Christmas, I can't wait to see how it turns out.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_display_result;
#! timestamp: 2021-07-23T20:51:55.892Z
U: cancel
UT: $dialogue @org.thingpedia.dialogue.transaction.cancel;
C: $dialogue @org.thingpedia.dialogue.transaction.cancel;
C: @com.icanhazdadjoke.get()
C: #[results=[
C: { id="4wciyk3EBAd"^^com.icanhazdadjoke:id, text="I got a reversible jacket for Christmas, I can't wait to see how it turns out." }
C: ]];
#! timestamp: 2021-07-23T20:51:55.913Z
A: Alright, let me know if I can help you with anything else!
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_end;
====
# main/76d47fe0-ea92-426f-8cb7-303c7b3c539c
#! timestamp: 2021-07-23T20:51:59.264Z
U: tell me a joke
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @com.icanhazdadjoke.get();
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: @com.icanhazdadjoke.get()
C: #[results=[
C: { id="QuscibaMClb"^^com.icanhazdadjoke:id, text="What does a pirate pay for his corn? A buccaneer!" }
C: ]];
#! timestamp: 2021-07-23T20:51:59.559Z
A: What does a pirate pay for his corn? A buccaneer!
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_display_result;
#! timestamp: 2021-07-23T20:52:01.659Z
U: cancel
UT: $dialogue @org.thingpedia.dialogue.transaction.cancel;
C: $dialogue @org.thingpedia.dialogue.transaction.cancel;
C: @com.icanhazdadjoke.get()
C: #[results=[
C: { id="QuscibaMClb"^^com.icanhazdadjoke:id, text="What does a pirate pay for his corn? A buccaneer!" }
C: ]];
#! timestamp: 2021-07-23T20:52:01.675Z
A: Alright, let me know if I can help you with anything else!
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_end;
First time, "tell me a joke" takes 447ms. Second time, the same command takes 295ms.