Skip to content

Mod browser search bar#126

Open
Aurumbi wants to merge 15 commits into
AWSW-Modding:developfrom
Aurumbi:search
Open

Mod browser search bar#126
Aurumbi wants to merge 15 commits into
AWSW-Modding:developfrom
Aurumbi:search

Conversation

@Aurumbi

@Aurumbi Aurumbi commented Jun 4, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-06-04 144646_searchbar

Implemented a modlist search function along with search bars for the ingame mod browser. they are able to search fuzzily, as to correct errors in input.

inner.clear_cache = clear_cache
return inner

# Copied from nltk (https://www.nltk.org/_modules/nltk/metrics/distance.html#jaro_similarity)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the license compatible?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, but I'm not sure. It's using the Apache License 2.0, and I'm not sure how this interacts with section 4.

Comment thread mods/core/download_mods.rpy Outdated
Comment thread mods/core/download_mods.rpy Outdated
@@ -0,0 +1,171 @@

def cache(function):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider an lru cache? Also, how much data is in the result? If we were running into memory issues, then could we minimise it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using sys.getsizeof for measuring, I've managed to max it out on around 12MB using many unrelated long searches on mod description, as such I'm not particularly concerned on the memory usage of the cache. I have considered an lru cache, but as memory does not seem to be a concern and the cache is cleared on screen close, I don't see why the added complexity is needed.

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.

2 participants