Knowledge points of interview questions

1. Process and thread: the reason why switching between processes is more expensive than threads

(1) Each process has a corresponding page table, and the page table needs to be switched when the process is switched. In order to speed up the address conversion efficiency of the virtual address, a TLB is introduced to cache the corresponding virtual address and physical address mapping.
(2) The operation of switching the page table itself is not very time-consuming. After switching, the TLB will become invalid, so it is necessary to search the page table again when performing address conversion, which causes the inefficiency of program operation.
(3) The threads of the same process share a page table, so switching between threads does not need to switch page tables.

2. Causes, troubleshooting and optimization of the page white screen

Reason : The main reason for the white screen of the page is that the page rendering is blocked

The reason for rendering blocking
(1) may be that CSS loading is blocked, and then because CSS is in the head tag, the content can only be displayed after loading CSS. However, CSS loading is blocked for some reason, resulting in the subsequent content. Render, thus turning the entire page into a white screen.
(2) It is also possible that the JS loading is blocked, which makes the page unable to be parsed. Finally, the entire page becomes a white screen.
Optimization method The best way to optimize is to directly optimize the volume of CSS and JS, so as to fundamentally solve the problem of slow
loading and loading blocking.
tail, and then put a small amount of CSS for positioning and other basic styles into the head to ensure that the page will first load the basic styles and elements of the page, and then load the Script tag of JS. You can also add async and defer attributes to make JS loading easier. It is loaded asynchronously, so that JS loading will not block the page parsing.
After the project is launched, others have a white screen, but the developer does not have a white screen here. What is the reason?

insert image description here

3. Two-way data binding and responsive principle

Responsive principle is a link of two-way data binding
reference link

Front-end login authentication

1. How to save the user's login status
2. User rights management

Guess you like

Origin blog.csdn.net/qq_42373007/article/details/130057768