-
Notifications
You must be signed in to change notification settings - Fork 334
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
Optimize report viewer dto size new #535
Optimize report viewer dto size new #535
Conversation
8e91602
to
eba678e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review of the java part (not tested yet :))
jplag/src/main/java/de/jplag/reporting/reportobject/model/ComparisonReport.java
Outdated
Show resolved
Hide resolved
jplag/src/main/java/de/jplag/reporting/reportobject/model/JPlagReport.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are a few comments on the code.
I also tested your version with a zip file with 50 submissions and around 1000 comparisons:
- No more file already exists exceptions, thank you
- Switching to max similarity (and back) freezes the site for about 30 seconds
- Is the distribution y-axis flipped?
- I still get an error on the comparison view, here is the log:
Uncaught (in promise) TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) at Function.from (<anonymous>) at Object.eval (store.ts?502f:32:1) at ComparisonFactory.getComparison (ComparisonFactory.ts?d6d7:5:1) at setup (index.js?e1de:60:1) at callWithErrorHandling (runtime-core.esm-bundler.js?d2dd:155:1) at setupStatefulComponent (runtime-core.esm-bundler.js?d2dd:7165:1) at setupComponent (runtime-core.esm-bundler.js?d2dd:7119:1) at mountComponent (runtime-core.esm-bundler.js?d2dd:5473:1) at processComponent (runtime-core.esm-bundler.js?d2dd:5448:1) at patch (runtime-core.esm-bundler.js?d2dd:5038:1)
jplag/src/main/java/de/jplag/reporting/reportobject/ReportObjectFactory.java
Outdated
Show resolved
Hide resolved
jplag/src/main/java/de/jplag/reporting/reportobject/ReportObjectFactory.java
Outdated
Show resolved
Hide resolved
jplag/src/main/java/de/jplag/reporting/reportobject/model/ComparisonReport.java
Outdated
Show resolved
Hide resolved
jplag/src/main/java/de/jplag/reporting/reportobject/model/Match.java
Outdated
Show resolved
Hide resolved
@sebinside thanks for the feedback!
I will look into what causes this.
I swore I had flipped the labels it alongside the data generation.. Fixed the labels.
That's weird I don't get an error... |
@sebinside I don't think there is a quick fix for the slow performance when switching metrics: rendering 1000 DOM Elements (especially with Vue's v-for) is expensive. Possible solutions I found include:
Of course, we should not build Pagination ourselves but rely on an existing implementation - we could and maybe even should adopt a UI Framework like BootStrapVue, Vuetify, etc... |
@nestabentum I totally understand that rendering so many elements takes time. However, the initial loading of the site (where the AVG metrics are rendered) takes significantly less time. That's why I wondered... Regarding the error: I checked out the branch of this PR and built the web viewer locally... I might have another look at it next week |
@nestabentum can you merge the current |
49eca21
to
1970f8b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor remarks
jplag/src/main/java/de/jplag/reporting/reportobject/mapper/MetricMapper.java
Outdated
Show resolved
Hide resolved
jplag/src/main/java/de/jplag/reporting/reportobject/mapper/ComparisonReportMapper.java
Outdated
Show resolved
Hide resolved
jplag/src/main/java/de/jplag/reporting/reportobject/ReportObjectFactory.java
Outdated
Show resolved
Hide resolved
jplag/src/main/java/de/jplag/reporting/reportobject/mapper/ComparisonReportMapper.java
Outdated
Show resolved
Hide resolved
As far as I can see, the addressed requested changes need approval by @dfuchss and @sebinside here. |
@nestabentum From looking at the changes, everything should be fine. However, the error in the comparison viewer still persists at least for me. I checked out a fresh version of this PR, tested multiple data sets, no success. I don't know whether this is only a problem in my installation. So I would guess, if no one is able replicate this problem, and the merge conflicts are resolved, this PR can be merged. |
There are some conflicts with the master branch. @nestabentum needs to solve them before we can merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As my comments are not that critical , I approve it :)
8960e59
to
a90e479
Compare
a90e479
to
7315125
Compare
Resolved all conversations and all merge conflicts, so this is good to go. @sebinside Very peculiar, but I'm sure eventually, we'll get to the bottom of this :) |
Kudos, SonarCloud Quality Gate passed! |
Ready for review version of PR #507.
The new file format . Consists of
overview.json
file: it contains all data for the overview page (metadata about the JPlag run, distributions, top comparisons)submissionX-submissionY.json
for each comparison. The json contains info about the matches in a comparison. This file does not contain any submission code anymore.Submissions
that has a subfoldersubmissionX
for each submission. The subfolder submissionX contains all original files of the submission.This file format significantly decreases the report's total size needed.
This PR should also fix crashes/lagging while reporting when handling large submissions.