-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Enhance file listing functions with sorting and prefix filtering #16526
Enhance file listing functions with sorting and prefix filtering #16526
Conversation
if I'm understanding correctly the point of this is so that it allows developers to split CSS into multiple files? if this is the case then I don't think this PR is necessary for demonstration
|
Explanation on Enhancing File Listing FunctionsAs the title suggests, Why Not to Use CSS
|
Consider not having ChatGPT write your response (or your PR) next time. |
i use it to format my files to .md and correct my syntactical errors do you have some kind of problem with this? correct this .md Here’s a corrected version of your sentence: "I use it to format my files to .md and correct my syntactical errors. Do you have a problem with this?" If you need further adjustments or specific formatting, feel free to ask! you are missing the point of the PRs |
I'm not a webdev so what I've said here can be totally wrong
in my test I have five css
using Chrome debugger disabled caching and enable throttling
if you're really having trouble maintaining large large CSS and from my understanding it is totally possible to set up automation so that the compilation of sass to css is automatic maintainability + performance best of both worlds
about your
unless the use case is very special
your example outputs of custom_sort_key custom_sort_key('style.css')
('style', '', '.css')
custom_sort_key('style-1.css')
('style-1', '', '.css')
custom_sort_key('style-12.css')
('style', '-12', '.css')
custom_sort_key('style-122.css')
('style-122', '', '.css')
custom_sort_key('style-a.css')
('style-a', '', '.css')
custom_sort_key('style-A.css')
('style', '-A', '.css')
to be honest
sure |
first we can provide an arg to the function to pass your own regx to sort the FILES(css, js, image files, safetensors, txt, json and so on) as you like as you did noticed the current reg expression does miss many cases by the way the code of this PR is ridiculously simple |
if your goal is to just provide a utility for better file searching, but this PR is not just that it's more of a 2.5 in 1
aside from there are many issues with the implementation especially with the custom sorting I don't believe point 2. about loading CSS is useful that's why I don't really see a good use case for multiple CSS and cant argee on point 2. out of curiosity
like I never use sass myself, but are you sure it doesn't support variables? I have no issues with if you wish to make a separate PR for a general file search utility if you do wish to make a separate PR for file search utility then might are several things to consider
as you mentioned
|
that sounds about right sorting and listing should be separate functions it would provide more modularity and more performance if someone wants the files without sorting https://www.npmjs.com/package/postcss-css-variables i would like to ask you if you would welcome a PR that use sqlLight to create a database for extranetworks and metadata also it would be nice to reply to my other PR that catboxanon close without reply |
if by extra networks metadata you mean "safetensor metadata" then we already using diskcache as far as I'm where is built on diskcache SQLite if it's about user metadata as we already have the modules in place it's trivial to use disk cache on it results may vary on the type of storage device I'm using nvme ssd
I could do a test to see if there's a significant Improvement later I guess
not to offend but if you want my honest thought is that unless you're not aware in lots of places it's not acceptable to use those tooles to write important such as PR motive adding to the fact that you implementation only works if position equals 0, so it's more of if you want my fault on that PR if you want to reopen that PR then I suggest you rewrite it properly |
you are right the LLM description is completely wrong i added this function to my webui to add options on the top i mean indexing of the filesystem and storing into the DB so it can be searched ordered and served paginate without
' |
using an LLM itself is not bad
while it is true that if you're not good a a language things can be hard "but it's just hard for you" basically for anyone reading an article by an LLM, one cannot trust a single word, every single every bit has to be re-examined so unless you are able to verify every single character of output form LLM your self in my opinion currently LLM is no good other than automating simple tasks or writing template codes
I don't think we currently do any sorting of user metadata in the backend and it never need to download all 38MBs of json (assuming by download you mean sending the json data to the browser)
I think it's safe to say that even you have a ridiculous amount of files like 100 times the actual information that needs to process isn't that many so I imagine the end performance difference wouldn't be that different I'm guessing that most of time is spent on IO latency and not by processing of the actuator and I'm guessing it's someone has enough files for Iowa latency to cause a great issue as any database caching of results would still need to check the actual data which means we need to at very least check the modification time of the file (maybe there's a more efficient methods I'm not sure) to make sure what's in the data is still up to date there is a PR that has I am not sure if will merged in this PR it makes the HTML extra netwroks grid in chinks, |
if you have any Improvement ideas then that great as mentioned we already have a framework for cacheing stuff using this discachk which use sqlite
I guess you missed a section of my previous message it not not 38MB of data it's 22MB of the raw json size whitch only about about at most 369 KB is data that webui uses regardless my point being I don't believe that reading json is the bottleneck |
I would like to create a PR for this but maybe it is better to wait until you decide with the PR from Sj-Si its from April this how it suppose to be done you only add one event listener to the container not the card or buttons whatever is inside a container can be captured with one event listener you literally can have 1 event listener to the whole document you sort filter the data object you dont parse the whole dom tree to filter sort against attributes that is very slow part of the prototype
/* Filtering Sorting Data */
how to use the event listener to an instance of the prototype
i hope you understand how unoptimized extranetworks is and the usage of duplicate views make things even worse |
that PR is kind of gigantic and to be honest I think it's out of the realm of something that can be decided by me to merge or close but if you want my personal feelings about that PR "I don't think it would be merged"
I think I repeated this couple of times I am not a webdav some things to take note
yes, I think we are all are aware of duplicating the entire is inefficient but having two separate views also has advantage that it keeps the scroll position and search filters for each tab individual
|
to my opinion is how you architect an application not a wedbev specificity if the program some things to take note and then the solution from above
yes you can store the scrollTop position for each, in one line of code for me it doesnt really make sense to have both of them |
do you use discord if so can you join AUTO's server invitation links to the server is on the Wiki page |
Thanks i will prepare write something to address many of the issues we discuss about, when ready i will visit the channel to talk about them you can initiate a discussion if you like to see if there is some interest |
Description
This pull request introduces a new function
list_files_with_prefix
that enhances the ability to list files with specific prefixes and extensions. The function is designed to provide more flexibility in file selection, enabling users to easily fetch stylesheets or similar files by specifying the desired prefix and file extension.Updated Usage in
css_html
function:css_html
function has been updated to uselist_files_with_prefix
to fetch CSS files. Specifically, it now looks for CSS files that start with "style" and have a.css
extension, making the code more readable and scalable.Additional Functionality:
Benefits
list_files_with_prefix
makes it apparent that files are filtered by both prefix and extension.Conclusion
This change aims to streamline the process of file retrieval based on specific criteria, enhancing the modularity and maintainability of the code. Future improvements can build upon this foundational change while maintaining backward compatibility where necessary.
Screenshots/videos:
Checklist: