🚧Convert to structs #80
Labels
🧨breaking-changes
Feature/changes contains breaking changes
high-priority
High Priority
🏎️performance
Performance improvements
preview
Done while in preview
🔬research
Research collection / investigation
tech-debt
Code refactoring or cleanup / tech debt reduction
Milestone
Complete The Item Below
Description
Look into converting types into read-only record structs. This issue will be half research and investigating what is possible; the other half will be the work to convert what we can.
Also, convert all the time values for the
ParticleEffect
class to floating point numbers instead of anint
. This is important for accurately changing of the values over time, which is important in particle engines.We can also investigate the impact of using
static abstract
interface members to see if this can get us the restrictions we want forfloat
vs.double
data types. We could also use generic math to achieve what we want, a C# 11 feature.If this is the case, maybe we can have
ParticleF
andParticle
types whereParticle
will be fordouble
andParticleF
will be forfloats
. Again, this is all theory but will require research.Note
It might not be possible to convert the
Particle
type to a read-only record struct due to the currentIParticle
interface, which is needed, and the method implementations.Warning
This will require further thought regarding how this might be used in other applications. One, in particular, will be Plazma Studio. Make sure to build the project into a local test nuget package and bring it into Plazma Studio to see the impact it will have
Reason:
This will improve ease of use and performance. Since this is a particle engine, we want to keep things fast. This means changing the engine to reduce memory pressure and GC collections.
Note
Take the time to do baseline performance testing and comparisons to ensure we increase performance. This is fine if this means creating some perf projects to add to the code base/solution.
Acceptance Criteria
The items to complete to satisfy the Definition of Done.
ToDo Items
The items to complete to satisfy the Definition of Done.
Issue Dependencies
No response
Related Work
No response
Additional Information:
Unit Tests
Reasons for local unit test execution:
💡Warning💡
If the unit tests pass remotely and are not executed locally, this means we could be letting a bug slip into production.
Though bugs will always exist in some capacity, we should all do our part to help prevent them from happening.
Change Type Labels
🐛bug
🧨breaking changes
✨new feature
♻️cicd
⚙️config
🏎️performance
🗒️documentation/code
📝documentation/product
Priority Type Labels
low priority
medium priority
high priority
Code of Conduct
The text was updated successfully, but these errors were encountered: