-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Codelite hand during rebuild project #3298
Comments
Looks like I found why this happen. Project generate 30+mb log and 500k+ lines of output.
This become very slow after 100k items. Also
|
Thanks, looking forward to apply your PR. I posted 2 comments on it (the first comment is crucial, the second is more of a "nit" comment) |
This looks redundant. We could use the previous insert and capture the iterator So the code above this snippet looks like: // We need the last item of this subtree (prev 'this' is the root)
clRowEntry::Vec_t::iterator iterCur = {};
if(prev == nullptr || prev == this) {
// make it the first item
iterCur = m_children.insert(m_children.begin(), child);
} else {
// optimization:
// we often get here by calling AddChild(), so don't loop over the list, check if `prev`
// is the last item
if(!m_children.empty() && m_children.back() == prev) {
iterCur = m_children.insert(m_children.end(), child);
} else {
// Insert the item in the parent children list
clRowEntry::Vec_t::iterator iter = m_children.end();
iter = std::find_if(m_children.begin(), m_children.end(), [&](clRowEntry* c) { return c == prev; });
if(iter != m_children.end()) {
++iter;
}
// if iter is end(), than the is actually appending the item
iterCur = m_children.insert(iter, child);
}
} |
What happen with changes from 0f46067 ? My second attempt was to remove all Vec_t crap and leave only double linked list. I am almost done this, but getters that returns m_children confuse me and I revert back to code from PR. I really does not understand design: why Vec_t used with double linked list: they do almost same things. |
I merged your changes. After I committed my small fix, I noticed that you did the same in the PR, so I resolved the conflict and merged (from GitHub UI) |
What happened?
Codelite infinite call
BuildTab::OnBuildAddLine
have no idea why: I try to debug this but not found who post events, probably it try to process same event infinite times.If it rely on
ZombieReaperPOSIX::Entry()
- this can be reason, because this code may lost events IMHO.OS: FreeBSD 14/stable
Version
Self compiled
Operating system
Other
Steps to reproduce
Relevant log output
No response
The text was updated successfully, but these errors were encountered: