Skip to content
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

hardcode bin bash #815

Closed
wants to merge 1 commit into from
Closed

Conversation

aminya
Copy link
Contributor

@aminya aminya commented May 7, 2020

By hard coding these two icons you reduce the loading time a lot (about 30-40ms). You shouldn't search through thousands of icons just to extract two arrays.

Before

2020-05-07 00_41_08-Timecop — C__Users_yahyaaba_Documents_GitHub_JavaScript_file-icons — Atom
2020-05-07 00_41_02-Timecop — C__Users_yahyaaba_Documents_GitHub_JavaScript_file-icons — Atom

After

2020-05-07 00_33_13-Timecop — C__Users_yahyaaba_Documents_GitHub_JavaScript_file-icons — Atom
2020-05-07 00_33_05-Timecop — C__Users_yahyaaba_Documents_GitHub_JavaScript_file-icons — Atom

Benchmark is done on top of #814

@Alhadis
Copy link
Member

Alhadis commented May 7, 2020

Actually, you've given me a great idea. The only reason we're even performing the search is because the indices change each time the icon-database is compiled. However, it never occurred to me to compute the offsets as part of the compilation process (well, actually it did, but I dismissed it as overkill at the time).

I'll update the compiler to spit out a hash of indices as part of the compilation step. Then I can get you to benchmark it and report on the performance difference.

@Alhadis Alhadis closed this in fbd86e5 May 7, 2020
@Alhadis
Copy link
Member

Alhadis commented May 7, 2020

Try now.

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.

None yet

2 participants