You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One issue I'm seeing though is that the Largest Contentful Paint time is quite high because of this library:
Curious if you have any suggestions on how to improve this? I'm using it in a next.js site hosted on Vercel like this:
import CodeMirror from '@uiw/react-codemirror'
import {go} from '@codemirror/legacy-modes/mode/go'
import {xcodeDarkInit} from '@uiw/codemirror-theme-xcode'
export default function Analysis() {
return (
<CodeMirror
value={inputCode}
placeholder={'Use AI to analyze your code\'s runtime complexity.\nWorks across languages and without requiring headers, imports, or a main statement - just the code itself.\nPlease note that results may be incorrect in subtle (or not so subtle) ways, so use at your own risk!'}
autoFocus
editable={!loading}
minHeight="300px"
extensions={[
StreamLanguage.define(go),
EditorView.lineWrapping
]}
theme={xcodeDarkInit({
settings: {
fontFamily: inputCode.length === 0 ? 'var(--font-inter)' : ''
}
})}
onChange={(value: any) => {
if (value.length > MAX_CODE_LENGTH) {
setErrorMessage(`Please enter code less than ${MAX_CODE_LENGTH} characters. You are currently at ${value.length} characters.`)
} else if (typeof errorMessage !== 'string' || typeof errorMessage === 'string' && errorMessage.length !== 0) {
setErrorMessage('')
}
setInputCode(value)
}}
/>
)
}
The text was updated successfully, but these errors were encountered:
Hi there, I'm using this library for https://www.timecomplexity.ai, and it's working nicely, so thank you for that!
One issue I'm seeing though is that the
Largest Contentful Paint
time is quite high because of this library:Curious if you have any suggestions on how to improve this? I'm using it in a next.js site hosted on Vercel like this:
The text was updated successfully, but these errors were encountered: