Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Replace Timings with Spark #8948

Closed
2 of 4 tasks
kashike opened this issue Mar 7, 2023 · 28 comments
Closed
2 of 4 tasks

Replace Timings with Spark #8948

kashike opened this issue Mar 7, 2023 · 28 comments
Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. type: feature Request for a new Feature.

Comments

@kashike
Copy link
Member

kashike commented Mar 7, 2023

Based on an internal discussion in August of 2022, we are now entering the planning stages to remove the Timings functionality from the Paper server software, and to include Spark in the distribution instead. More information will be shared once plans have solidified, this issue is being opened now to begin public tracking of our plans.

Some of the reasons for this are as follows:

  • Timings has been unmaintained for multiple years now, with only very few additional timings categories added since. Because of this, it is not ideal for actually identifying causes of lag in specific plugins or parts of the server outside of simple categories like synchronous chunk loads.
  • Timings are difficult to read for people that are new to it, and there are no short and easy to digest tutorials on it either. Spark is a lot less confusing in terms of UI and has more beginner-friendly documentation.
  • Enabling timings can sometimes have non-negligible hits on server performance, whereas Spark is lighter and also has an asynchronous profiling mode.

While all of this is still open for discussion, here are potential todos:

@hendoulmou9
Copy link

Figure out how exactly to bundle or include spark: for example, we can create a new timing using Spark's Spark.createTask() method, which takes a string as a parameter representing the name of the timing task. We then start the timing using the startTiming() method, and run some code. Finally, we stop the timing using the stopTiming() method.

@Phoenix616
Copy link
Contributor

Phoenix616 commented Mar 31, 2023

I feel like one requirement for a replacement should be to have equally user-friendly names for entries like Timings has right now which is a major benefit of it over Spark: That someone who doesn't know anything about internals is able to quickly spot what is wrong and not have to bother data that doesn't matter for them.

Having just the (sometimes confusing or even wrong) Mojang names of classes/methods doesn't really help people that are not developers and right now Timing names also provide additional context like the type of entity or the default tick counts that are currently not accessible via Spark or (easy) other means.

  • Timings are difficult to read for people that are new to it, and there are no short and easy to digest tutorials on it either. Spark is a lot less confusing in terms of UI and has more beginner-friendly documentation.

Basically I'm counteracting this point. Spark profile entries are a lot harder to read than timings entries are. Timings (in contrast to spark) even provides the parts that cause issues directly at the top as well as point out lag directly, something that Spark doesn't do (at least as far as I know)

If anything the Mojang profiler information (which is in places more granular than timings) should be used. (Or could even be pulled into timings directly to solve the "Timings has been unmaintained for mulitple years now" part)

Other requirements (besides better user-friendlieness/usability) for a new system that I see that Spark doesn't provide (right now):

  • A way for plugins to specify human-readable names for stuff like Timings did would be really appreciated, a user is not going to understand what some loop/stream structure means but they can easily know that with plugin-author provided information
  • Automatic pointing out stuff that causes lag (similar to Timings default lag view and the ordering of the entries by the time spent. Spark (by default) uses a tree view which you need to manually expand)
  • Easily accessible Entity count information per region (Timings region tab, Spark has that information but the interface there right now is really convoluted and hard to use)

@regulad
Copy link

regulad commented Apr 1, 2023

You should consider contributing to Spark to bring it closer to feature parity with Timings, as the Timings library has been unmaintaned for quite some time now (see OC issue) and only becomes more archaic and harder to work with as time goes on. Spark, on the other hand, is still being actively maintained and having features added. Other Paper forks like Pufferfish/Purpur have already replaced their timings with Spark, and do not seem to have lost any functionality or ease-of-use.

@Phoenix616
Copy link
Contributor

Phoenix616 commented Apr 1, 2023

@regulad I fail to see how your comment helps at all with the discussion how Spark can/should be included in Paper directly and how it compares to Timings. Of course if Spark should be used directly and changes need to be made to bring it up to the usability of Timings then that could be contributed directly to their project (although it would probably still be necessary to have some changes be done directly in the server and not just Spark alone, e.g. Spark would not be able to automatically know the context that their data is gathered from without markers directly in the server code indicating that in a human-readable way similar to how Timings work right now)

@Fillup99999
Copy link

image
This is the spark jar file. May want to look into another solution...

@electronicboy
Copy link
Member

Antivirus software is generally useless about jar files and often just flags stuff somewhat blindly at best. I don’t think that the malicious result from a singular piece of software stands for annything against an open source project in which you can vet every single line of code in the output.

@Codixer
Copy link
Contributor

Codixer commented May 31, 2023

image This is the spark jar file. May want to look into another solution...

This is the worst example of a "Hey this file is a virus" warning I have ever seen.
I would really check who created Spark, considering they also created one of the most famous permission plugins in the world. And with 63 anti-virus's who say it's not a virus? I doubt it would be a virus as all.

How do I know for sure it's owned by the same guy? Well:

Case and point. If you make an accusation of something being a virus, do some proper testing and sandboxing first.

@DinoxdYT

This comment was marked as spam.

@PaperMC PaperMC locked and limited conversation to collaborators Apr 28, 2024
@codebycam codebycam converted this issue into discussion #10565 Apr 28, 2024
@NoahvdAa NoahvdAa unpinned this issue Jul 20, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. type: feature Request for a new Feature.
Projects
None yet
Development

No branches or pull requests