I can work around most little bugs I run into in the core Kernel itself–and Kernel bugs just make me reimplement functionality, which means I have a more robust implementation that I understand in the end–but there are many things in the FE I can’t work around, almost entirely related to Dynamic and its brethren as there is no way to really robustly control the FE from the WL at the low level (even using undocumented functions).
I’d really like a discussion, then, of the generally poor performance of Dynamic and the crazy work-arounds one has to do to make it clean.
Here’s one such issue. First I make a Dynamic which uses a TaggingRule to listen for a specific key:
Dynamic[
{
RandomReal[],
CurrentValue[
EvaluationNotebook[],
{TaggingRules, "test"}
]
}
]
Then if I update a completely unrelated key, that Dynamic gets updated, e.g. by:
CurrentValue[
EvaluationNotebook[],
{TaggingRules, "not-test"}
] = 1
I emailed John Fultz about this and he said the best option was something like:
DynamicModule[{cachedValue},
DynamicWrapper[
Dynamic[
{
RandomReal[],
cachedValue
}
], cachedValue = CurrentValue[EvaluationNotebook[], {TaggingRules, "test"}]]
]
which kinda works in this case but which is definitely not scalable and I’m not even convinced is robust in the more complicated workflows I want to build.
Long term I want to be able to use the FE as an IDE with efficient tab management, toolbars, file browsing, extension-specific stylesheets, etc.
I have all the infrastructure for this and I use it day-to-day, but the FE is too slow to really encourage other people to use it–and much of the reason for this is in the poor performance of Dynamic (there are other issues like the fact that NotebookWrite is ridiculously slow, but that’s probably harder to fix).