Skip to content
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

Improve Loading Performance #11

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7df3315
Update to JDK 17
Nov 27, 2023
e6a99c0
Update app to version 17
Nov 27, 2023
cdc7d35
Some ideas how to improve loading performance
Nov 27, 2023
20a1ac7
Revert "Some ideas how to improve loading performance"
Nov 27, 2023
2a8feb2
Make loading of mindmap run in background
Nov 28, 2023
c9b3fd2
Refactor helper package
Nov 28, 2023
4dac248
Refactor into separate packages for view and model
Nov 28, 2023
60c1f34
Move file loading to separate class
Nov 28, 2023
5e4e594
Move document loading into AsnycMindmapLoaderTask
Nov 28, 2023
ba645b3
Show loading spinner
Nov 28, 2023
5826bc2
Fix concurrent modification of list
Nov 28, 2023
b6c6100
Fix bug that links were not visible in context menu
Nov 28, 2023
2337bca
Some extra logging to be reverted
Nov 28, 2023
d432ed2
Revert "Some extra logging to be reverted"
Nov 28, 2023
6ba3814
Trying to split out XML parsing from MindmapNode
Nov 28, 2023
8f117ac
Trying to add Stax parser (woodstox or aalto), neither work on Android
Nov 28, 2023
8e412bb
Revert "Trying to add Stax parser (woodstox or aalto), neither work o…
Nov 28, 2023
39b4cd7
Revert "Revert "Trying to add Stax parser (woodstox or aalto), neithe…
Nov 28, 2023
7520202
Another attempt, but this doesn't work either. Links in the description
Nov 28, 2023
d63d0c7
Revert "Another attempt, but this doesn't work either. Links in the d…
Nov 28, 2023
9798993
Revert "Revert "Revert "Trying to add Stax parser (woodstox or aalto)…
Nov 28, 2023
abb883d
Fix crash when rotating screen
Nov 29, 2023
8e3b167
Basic implementation of XML Pull Loader
Nov 29, 2023
797fc65
Merge branch 'master' into improve-loading-performance
Dec 2, 2023
fa583a2
Upgrade dependencies
Dec 2, 2023
39ede7c
Version updates
Jan 3, 2024
ef7bb06
Load richtext content
Jan 3, 2024
986b1e8
Rich content loading seems to work
Jan 3, 2024
fd5bb17
Skip empty richcontent tags
Jan 3, 2024
9be3413
Change content subscriber to richtext content subscriber
Jan 3, 2024
3a3a849
Load bold and italics
Jan 3, 2024
4fb2c35
Load icons
Jan 3, 2024
1b11545
Load links
Jan 3, 2024
a412b0b
Load links, cloned nodes and arrows
Jan 3, 2024
0744596
Code cleanup
Jan 3, 2024
510231d
Merge branch 'master' into improve-loading-performance
Jun 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix concurrent modification of list
Benedikt Koeppel committed Nov 28, 2023
commit 5826bc2f394e752cc818eaac1abcdecf80e546c8
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@

import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import javax.xml.transform.Transformer;
@@ -339,27 +340,30 @@ public int getNumChildMindmapNodes() {
public List<MindmapNode> getChildNodes() {

// if we haven't loaded the childMindmapNodes before
if (childMindmapNodes == null) {
if (this.childMindmapNodes == null) {

// fetch all child DOM Nodes, convert them to MindmapNodes
childMindmapNodes = new ArrayList<>();
List<MindmapNode> newChildMindmapNodes = new ArrayList<>();
NodeList childNodes = node.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
Node tmpNode = childNodes.item(i);

if (isMindmapNode(tmpNode)) {
MindmapNode mindmapNode = new MindmapNode(tmpNode, this, mindmap);
childMindmapNodes.add(mindmapNode);
newChildMindmapNodes.add(mindmapNode);
}
}
return childMindmapNodes;

this.childMindmapNodes = Collections.unmodifiableList(newChildMindmapNodes);

}

// we already did that before, so return the previous result
else {
Log.d(MainApplication.TAG, "Returning cached childMindmapNodes");
return childMindmapNodes;
}

return this.childMindmapNodes;
}

public List<String> getIconNames() {
Original file line number Diff line number Diff line change
@@ -85,10 +85,8 @@ public NodeColumn(Context context, MindmapNode parent) {
// create list items for each child node
mindmapNodeLayouts = new ArrayList<>();
List<MindmapNode> mindmapNodes = parent.getChildNodes();
synchronized (mindmapNodes) {
for (MindmapNode mindmapNode : mindmapNodes) {
mindmapNodeLayouts.add(new MindmapNodeLayout(context, mindmapNode));
}
for (MindmapNode mindmapNode : mindmapNodes) {
mindmapNodeLayouts.add(new MindmapNodeLayout(context, mindmapNode));
}

// define the layout of this LinearView