-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
WIP: Feat: optimize argocd-server #21334
base: release-2.11
Are you sure you want to change the base?
Conversation
@@ -249,7 +249,7 @@ func NewCommand() *cobra.Command { | |||
command.Flags().StringVar(&dexServerAddress, "dex-server", env.StringFromEnv("ARGOCD_SERVER_DEX_SERVER", common.DefaultDexServerAddr), "Dex server address") | |||
command.Flags().BoolVar(&disableAuth, "disable-auth", env.ParseBoolFromEnv("ARGOCD_SERVER_DISABLE_AUTH", false), "Disable client authentication") | |||
command.Flags().StringVar(&contentTypes, "api-content-types", env.StringFromEnv("ARGOCD_API_CONTENT_TYPES", "application/json", env.StringFromEnvOpts{AllowEmpty: true}), "Semicolon separated list of allowed content types for non GET api requests. Any content type is allowed if empty.") | |||
command.Flags().BoolVar(&enableGZip, "enable-gzip", env.ParseBoolFromEnv("ARGOCD_SERVER_ENABLE_GZIP", true), "Enable GZIP compression") | |||
command.Flags().BoolVar(&enableCompress, "enable-gzip", env.ParseBoolFromEnv("ARGOCD_SERVER_ENABLE_COMPRESS", true), "Enable compression") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be a breaking change, let's keep the env variable for enable gzip.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
|
||
a.Annotations = nil | ||
return a | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we prune application? Would those fields not be useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, these fields are unnecessary. When clicking the application card, the entire application will be requested again. However, to maintain compatibility with existing code that might already use the list interface, a prune parameter should be added, and the UI should include this parameter in its requests.
return | ||
} | ||
|
||
if isChromeVersionAtLeast(request.Header.Get("User-Agent"), 123) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment why version 123 is picked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fine, i will add it to comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other browsers support zstd now, it looks like: https://caniuse.com/zstd
@@ -25,7 +25,7 @@ import {useSidebarTarget} from '../../../sidebar/sidebar'; | |||
import './applications-list.scss'; | |||
import './flex-top-bar.scss'; | |||
|
|||
const EVENTS_BUFFER_TIMEOUT = 500; | |||
const EVENTS_BUFFER_TIMEOUT = 2000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the number of applications is too large, updates are triggered in almost every 500ms cycle. Could the interval here be adjusted based on the number of applications listed in the previous step, with several different values to choose from? This would sacrifice some real-time performance to ensure smoother page performance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't the main optimization point; perhaps I should just revert it for now?
5b10f7f
to
cb5f562
Compare
cb5f562
to
bc72888
Compare
Features:
Checklist: