ashb commented on code in PR #22835:
URL: https://github.com/apache/airflow/pull/22835#discussion_r845290649


##########
airflow/www/static/js/calendar.js:
##########
@@ -63,9 +63,6 @@ const dateFormat = 'YYYY-MM-DD';
 document.addEventListener('DOMContentLoaded', () => {
   $('span.status_square').tooltip({ html: true });
 
-  // JSON.parse is faster for large payloads than an object literal
-  const rootData = JSON.parse(calendarData);

Review Comment:
   It's detailed in that PR. The point is that an object literal slows down 
DOMReady, so delaying it to after the event via `JSON.parse` makes it more 
performant. So yes, `const calendarData = {{ data|tojson }};` makes 
calendarData a string that. That's the point.)
   
   (The variable is badly named.)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to