HacktoberWall is a simple web app where contributors can add their name to a virtual wall by submitting a JSON file. The goal is to offer an easy way for people to participate in Hacktoberfest. Contributors can add their name or help improve the page's design and functionality, creating a growing display of Hacktoberfest participants.
Currently, the search functionality has two key inefficiencies:
Repeated Fetching of contributors.json: Every time a character is typed in the search bar, the loadContributors() function is called, which repeatedly fetches the contributors.json file. This is unnecessary and can be optimized by fetching the file only once when the page loads.
Inefficient Search Algorithm: The current search over contributor names is done using a linear search method. This approach could become slow as the number of contributors grows. A more efficient approach, like using a trie (prefix tree), could significantly speed up prefix-based searches.
Tasks
[ ] Load the contributors.json file only once when the page loads, and store the data in memory for subsequent use.
[ ] Implement a more efficient search algorithm using a trie (prefix tree) for fast prefix-based lookups.
[ ] Ensure the search works smoothly as the user types and handles large data sets efficiently.
[ ] Test the changes to verify improved performance.
Feature Info
Fetching the JSON file once reduces unnecessary network requests, improving load performance.
Using a trie for searching enhances scalability, allowing the search to remain fast even as the number of contributors increases.
Additional Context
Optimizing the search functionality will provide a better user experience, especially as the project grows and more contributors are added.
Currently, the search functionality has two key inefficiencies:
Repeated Fetching of
contributors.json
: Every time a character is typed in the search bar, theloadContributors()
function is called, which repeatedly fetches thecontributors.json
file. This is unnecessary and can be optimized by fetching the file only once when the page loads.Inefficient Search Algorithm: The current search over contributor names is done using a linear search method. This approach could become slow as the number of contributors grows. A more efficient approach, like using a trie (prefix tree), could significantly speed up prefix-based searches.
Tasks
contributors.json
file only once when the page loads, and store the data in memory for subsequent use.Feature Info
Additional Context
Optimizing the search functionality will provide a better user experience, especially as the project grows and more contributors are added.