-
Notifications
You must be signed in to change notification settings - Fork 662
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
[RESEARCH] Performance of Foam in large projects #1375
Comments
For now, I am doing some tests and research with https://github.com/github/docs. A relatively large project with many markdown files that I can use for research. |
Just came across https://github.com/rcvd/interconnected-markdown/tree/main/Markdown. This contains not only many notes, but also highly linked. Great for researching the performance of Foam |
Some initial investigation points to the function The function is defined as: public listByIdentifier(identifier: string): Resource[] {
const needle = normalize('/' + identifier);
const mdNeedle =
getExtension(needle) !== this.defaultExtension
? needle + this.defaultExtension
: undefined;
const resources: Resource[] = [];
for (const key of this._resources.keys()) {
if (key.endsWith(mdNeedle) || key.endsWith(needle)) {
resources.push(this._resources.get(normalize(key)));
}
}
return resources.sort(Resource.sortByPath);
} For my test repo the I will do some experiments with optimising the for loop in this area and see if that boosts performance. |
I am interested in this. I have a graph of aproximately 3k notes and 8k links. I also have some Python scripts I am using to make community detection over the graph. It results in around 50~100 or more communities. On the visualization, everything shows no problem. The problem arises if I want to explore only one community or a couple of them. The community of each note is saved at it's type so I can take out communities in the FOAM viz. If I only want to show one community of around 50 notes, it shows but then the physics break, the force directed approach can't handle it for some reason. If I try to select two communities, the moment I select the second one, the physics break and the links dissapear. I don't know what the reason might be but maybe the nodes not shown are still loaded and the physics engine tries to calculate anyways? whatever it is, the most types existing on the graph, the worse the performance gets. I've been thinking several solutions to this for some time and I've though a couple:
I can share some plots I've made but using python. Not that we should change the viz, but the physics engine of the plots I mention is less realistic and more aimed towards aesthetics not physical realism. I know that D3.js has a lot of options for visualization and that FOAM uses force-graph, which in turn uses D3, but I've never personally used it. Anyway I will gladly help to research this. |
I've been looking at the initial workspace loading time. At first sight, not much to be gained in this area. Most time is spent in reading the files from the datastore. Perhaps the parser could be made more efficient in the end, but don't see an opportunity here in short term. |
Second this. Long story short, it is so extremely terrible, I have no choice but to change to Dendron and see, if it works with that framework, at least. Whenever I want to write any document, the editor has too extreme lags. This extension makes it unusable. |
Describe the bug
Various users reported performance issues with large notes or projects with many notes. This issue serves as a collection of those reports. It acts as the documentation of ongoing research on performance.
Small Reproducible Example
No response
Steps to Reproduce the Bug or Issue
..
Expected behavior
We want to optimise the performance of Foam, even in large projects.
Screenshots or Videos
No response
Operating System Version
All OS
Visual Studio Code Version
Latest at least
Additional context
No response
The text was updated successfully, but these errors were encountered: