Opening the periods_edit_popup by right-clicking or long-pressing a period takes a lot of processing time, especially on slower devices, such as mobile phones. This is probably caused by the property periods_edit_inputs_container.innerHTML being used in a loop for creating the content of the dialog. This forces the elements of the periods_edit_inputs_container to be redrawn for each iteration of the loop which needs a lot of time. A faster approach would be to use the methods document.createElement() and element.appendChild() instead.