I’ve recently adopted the practice of doing everything from code, i.e., not using the Anvil Designer at all (it costs a few more lines of code but ensures that your code “tells the full story”). As part of this endeavour, I associate a form with an HTML template by setting the form’s html attribute (in the form’s init) to the relevant HTML file in Assets (if you do not care about text-highlighting and automatic indentation for your HTML markup you can also treat your HTML markup as a (potentially, multi-line) Python string and assign this string to the form’s html attribute). This practice does not cause any delays.
class Form1(Form1Template):
def __init__(self, **properties):
self.init_components(**properties)
self.html = '@theme:main.html' # Similar to selecting main.html in Designer.
# Or: self.html = '<div anvil-slot-repeat="default"></div>'