Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-debug-dev] CValue.hasVariables()

I found that CValue fails to use its cached information in its implementation of IValue.hasVariables(), resulting in a trip to the backend on every invocation. If we use a cache to avoid repeated trips to the backed for IValue.getValueString() and IValue.geVariables(), it seems to me that not doing so for hasVariables() is probably an oversight, and an opportunity for a performance improvement (could help make a heavily populated variables view a little snappier; this method gets called fairly often).

On the same token, the cache logic in getVariables0() seems a bit flawed. Effectively, it says: if our cached children list is empty, then we must have not gotten the list from the backend, so try to get it now. But in fact, we might have been there before--already asked the backend and it told us the variable has no children. So, really, we shouldn't be asking again. Not sure how much we stand to gain here, but if we're going to use a cache in CValue, we should probably use it in a consistent manner.

I wanted to pose the question before opening a bugzilla report, in case I'm overlooking something.

John



Back to the top