Skip to content

adds support for lazy loading

Harkishen Singh requested to merge Harkishen-Singh/MindTheWord:master into master

This MR solves #264 (closed) issue.

Since, use of MutationObserver for keeping a check on DOM modification is performance sensitive, hence a check has been made before adding the DOMs to the mainstream. Node-list size beyond 3000 in length in most cases, starts to affect the performance of the browser. Hence, in order to avoid such situation, only the most recent 3000 DOMs would be considered, thereby keeping a balance between the translated words view and the performance. Further suggestions on improving the performance are most welcome.

Example test case in Facebook[Video] (DOM modification in body child-lists):

93fe578d-89af-4f37-y4f8-603332fc4cd2

Edit 1:

MTW_lazy_loading

Edit 2: delay in translation on initial page loading has been fixed.

Delhi_-_Wikipedia

Edited by Harkishen Singh

Merge request reports