airqo-platform / airqo-platform/AirQo-api

Consider memoizing the roundObject function in getAirQualityAnalytics

Open
#3,776 0 comments 0 reactions 1 assignee Claimed by @Baalmart View on GitHub
Dominant language
JavaScript
Stars
26
Forks
24
Avg merge
5h 36m
Merged PRs (30d)
81

Description

The function `roundObject` in `src/device-registry/models/Reading.js` is called multiple times with potentially similar objects. Memoization could improve performance for large datasets.

Reference: [Pull Request #3762](https://github.com/airqo-platform/AirQo-api/pull/3762)
Comment: [CodeRabbit suggestion](https://github.com/airqo-platform/AirQo-api/pull/3762#discussion_r1816465495)
Requester: @Baalmart

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.