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

Tabs to spaces pr 873 #916

Closed
wants to merge 74 commits into from
Closed

Conversation

Juiceman
Copy link
Contributor

@Juiceman Juiceman commented Feb 8, 2024

No description provided.

TheSeeker and others added 30 commits October 22, 2023 00:42
Regex was too greedy, matched last instance of what looks like an edition isntead of the first.
fix Switch/Case -> switch/case
fix missing parens.
fix scope issue.
Zap all tabs to spaces and eliminate extra spaces at end of lines for entire codebase. Other outstanding PR will be converted also.
The Java 8 Date-Time APIs provide superior alternatives for the methods
provided in this class.
Only get() and getInMillis() were used within Fred. These methods can
trivially be replaced by new Date() and System.currentTimeMillis()
respectively.
Also remove unused private field with type Random from DatabaseKey class.
Remove some unused methods from tests.

Signed-off-by: Veniamin Fernandes <[email protected]>
Also removes stacktrace printout and exception suppression.
This slightly changes behavior, but exceptions are not silenced anymore.
Note:
I changed only places mentioned in the review comments.
Some better and massive tabs-vs-spaces fix is required to solve all other issues.
…gnature

Checked UnsupportedEncodingException cannot be removed because of backward compatibility.
 As stated in the description of this option, if a large portion of the network disables packet padding it makes the network easier to trace. 15 years later now, if network overhead is a real concern for some users they can tweak this themselves.
In UdpSocketHandler.innerCalculateMaxPacketSize() the lesser of the configurable variable node.maxPacketSize and UdpSocketHandler.MAX_ALLOWED_MTU is used, the latter of which was hard coded to 1280.
We are actually checking if the string is empty. Using .isEmpty() is clearer.
ArneBab and others added 29 commits February 7, 2024 23:15
In the profiling with jvisualvm this reduces the total time for
MessageFilter::match from 5x the self-time to about 1.2x the self-time

In profiling with instrumentation, MessageFilter::match is the most
expensive method call, because it is called millions of times in a
tight inner loop while handling messages.
Match is called so often, that the match-method with two arguments
took 20% of the self-time of the match-method with three arguments.

This may be inflated due to the instrumentation, though, because the
method with two arguments does nothing except for running the method
with three arguments with the default (false), so I expect less than
those 20% in wins.
To evaluate the logs this produces:

grep -Eo or-match.* ~/Freenet/logs/freenet-latest.log | \
  sort | uniq -c | sort -h \
  > misordered-MessageFilter-or-matches.log
cat misordered-MessageFilter-or-matches.log

this produces a list of MessageFilters with the frequency for pairs
where the first is the one that did not match and the second is the
filter that did match.
With the decision by OLG Köln from 2023-11
https://www.heise.de/news/Oberlandesgericht-Cloudflare-haftet-als-Taeter-fuer-Urheberrechtsverletzungen-9355760.html
caching services must stop access quickly when they get a report.

Therefore linking directly to an index becomes too risky: we’ll have
link them only via the Index of Indexes so we can remove the link to
the index quickly if an index fails to react to a report in time.
(bug reported by oishii@e-FUmCyxfF9D… on FMS)
There were no restraints on negative values or extremely large values of amountOfDataToCheckCompressionRatio.
Add a less than zero and a max of 100 MiB check.
amountOfDataToCheckCompressionRatio log message was hard to read
Zap all tabs to spaces and eliminate extra spaces at end of lines for entire codebase. Other outstanding PR will be converted also.
Zap all tabs to spaces and eliminate extra spaces at end of lines for outstanding PRs
@Juiceman Juiceman closed this Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants