Skip to content

Commit

Permalink
Enable sorting of chat inputs first to improve UI message speed
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabrielluiz committed Nov 11, 2024
1 parent f43fd89 commit 6c86f15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend/base/langflow/graph/graph/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,8 @@ def sort_vertices(

vertices_layers = self.layered_topological_sort(vertices)
vertices_layers = self.sort_by_avg_build_time(vertices_layers)
# vertices_layers = self.sort_chat_inputs_first(vertices_layers)
# Sort the chat inputs first to speed up sending the User message to the UI
vertices_layers = self.sort_chat_inputs_first(vertices_layers)
# Now we should sort each layer in a way that we make sure
# vertex V does not depend on vertex V+1
vertices_layers = self.sort_layer_by_dependency(vertices_layers)
Expand Down

0 comments on commit 6c86f15

Please sign in to comment.