GyaanSetu WebDev

Frontend, backend and devops for the modern web.

209 articlesDeep, practical knowledge

How to Stop Training Bots While Keeping Citation Bots for ChatGPT Traffic

A generic “Disallow: /” for GPTBot only blocks the training crawler; the citation bots that surface your pages in ChatGPT’s answer pane remain active. Use explicit robots.txt rules or Cloudflare’s AI Crawl Control to allow OAI-SearchBot, ChatGPT-User, and their peers while denying GPTBot, ClaudeBot,

WebDev · 4 min read

Cleanup Script Erased Code Snippets From Dozens of Articles

A routine maintenance job mis-identified Liquid’s {% raw %} tags, treating them as unclosed variables and stripping the surrounding code blocks from every article that used them, forcing an emergency rollback and a rethink of migration testing.

WebDev · 3 min read

ಸಬ್‌ಸ್ಟ್ರಿಂಗ್ ಅಲೋಕೇಶನ್‌ನಿಂದಾಗಿ ಹಾಟ್ ಲೂಪ್‌ನಲ್ಲಿ 7.8 MB ವ್ಯರ್ಥವಾಯಿತು – ಸ್ಪಾನ್ ಲುಕ್‌ಅಪ್‌ಗೆ ಬದಲಾಯಿಸಿ

Substring ಮೂಲಕ ಪ್ರತಿ ಡಿಕ್ಷನರಿ ಲುಕ್‌ಅಪ್‌ಗಾಗಿ ಹೊಸ ಸ್ಟ್ರಿಂಗ್ ಅನ್ನು ರಚಿಸುವುದರಿಂದ 7.8 MB ಗಾರ್ಬೇಜ್ ಅಲೋಕೇಟ್ ಆಗುತ್ತಿದೆ ಎಂದು ಪ್ರೊಫೈಲರ್ ಬಹಿರಂಗಪಡಿಸಿತು. .NET 9 ನ GetAlternateLookup ಅನ್ನು ReadOnlySpan<char> ಜೊತೆಗೆ ಬಳಸುವುದರಿಂದ ಅಲೋಕೇಶನ್ ತಪ್ಪುತ್ತದೆ ಮತ್ತು ಲೂಪ್‌ನ ವೇಗವು 1.5x ಹೆಚ್ಚಾಗುತ್ತದೆ.

WebDev · 1 min read

TryGetValue ಗಿಂತ CollectionsMarshal ಡಿಕ್ಷನರಿ ಎಣಿಕೆಯ ಸಮಯವನ್ನು 1.7 ಪಟ್ಟು ವೇಗವಾಗಿ ಮಾಡುತ್ತದೆ

ಒಂದು ಪದವನ್ನು ಒಮ್ಮೆ ಎಣಿಸಲು ನಾನು ಅದನ್ನು ಎರಡು ಬಾರಿ ಹ್ಯಾಶ್ ಮಾಡಿದೆ. ಕಳೆದ ವಾರ ನಾನು ಲಾಗ್ ಪಾರ್ಸರ್ ಅನ್ನು ಪ್ರೊಫೈಲ್ ಮಾಡಿದೆ. ಇದು ದೈನಂದಿನ ಲಾಗ್‌ನಲ್ಲಿ ಎರರ್ ಕೋಡ್‌ಗಳನ್ನು ಎಣಿಸುತ್ತದೆ. ಇದರ ಮೂಲ ತರ್ಕವು ಸರಳವಾದ ಡಿಕ್ಷನರಿ ಅಪ್‌ಡೇಟ್ ಆಗಿದೆ. ಹೆಚ್ಚಿನ ડેವಲಪರ್‌ಗಳು...

WebDev · 1 min read