================
@@ -77,16 +77,19 @@ ProgressEvent::Create(uint64_t progress_id, 
std::optional<StringRef> message,
   if (event.GetEventType() == progressStart && event.GetEventName().empty())
     return std::nullopt;
 
-  if (prev_event && prev_event->EqualsForIDE(event))
+  if (prev_event && prev_event->EqualsForIDE(event, total))
     return std::nullopt;
 
   return event;
 }
 
-bool ProgressEvent::EqualsForIDE(const ProgressEvent &other) const {
+bool ProgressEvent::EqualsForIDE(const ProgressEvent &other, uint64_t total) 
const {
   return m_progress_id == other.m_progress_id &&
-         m_event_type == other.m_event_type &&
-         m_percentage == other.m_percentage;
+         m_event_type == other.m_event_type && 
+         // If we check the percentage of a non-deterministic event
----------------
Jlalond wrote:

First, let me apologize for being overly brief in my explanation. You're 
correct @ashgti, but now imagine all the updates.

Let's say we're indexing dwarf, you'll get the start, *the first update* and 
then the end.

As an extreme hypothetical, if this takes 30 minutes you will have 0 progress 
actually sent to the progress bar in VSCode resulting in what appears to be a 
hang of LLDB.

So, for non-deterministic events we want to update for every time window. DAP 
limits to 250 ms, which I think is fine. I might need to change the equals 
check now that I spell this out but I hope this explains the intent!

https://github.com/llvm/llvm-project/pull/140162
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to