Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: iswebGl2 fixed #202

Merged
merged 3 commits into from
Oct 9, 2024
Merged

feat: iswebGl2 fixed #202

merged 3 commits into from
Oct 9, 2024

Conversation

XinyueDu
Copy link
Contributor

@XinyueDu XinyueDu commented Oct 9, 2024

🤔 This is a

  • Bug fix

🔗 Related issue link

  1. The use of the isWebGL2 method call can impact the performance of the map.

💡 Background and solution

  1. The map rendering is found to have stuttering issues. After debugging, it is discovered that the problem lies in the call to the isWebGL2 method.
Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

src/webgl/utils.ts Outdated Show resolved Hide resolved
src/webgl/utils.ts Outdated Show resolved Hide resolved
src/webgl/utils.ts Outdated Show resolved Hide resolved
@hustcc
Copy link
Member

hustcc commented Oct 9, 2024

为啥这个会导致卡顿?

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Why does this cause lag?

@XinyueDu
Copy link
Contributor Author

XinyueDu commented Oct 9, 2024

为啥这个会导致卡顿?

项目使用谷歌性能诊断,isWebGL2耗时较高, 很多方法调用了 isWebGL2 该函数。
lQLPKGVseNT7sT_NBlbNDv6wusCScBdxh74G3NeiGaJQAQ_3838_1622_副本

@lzxue
Copy link
Contributor

lzxue commented Oct 9, 2024

为啥这个会导致卡顿?

项目使用谷歌性能诊断,isWebGL2耗时较高, 很多方法调用了 isWebGL2 该函数。 lQLPKGVseNT7sT_NBlbNDv6wusCScBdxh74G3NeiGaJQAQ_3838_1622_副本

主要还是调用频次很多,多次调用耗时就高了

@lzxue lzxue merged commit 113e2e6 into release Oct 9, 2024
6 checks passed
@lzxue lzxue deleted the feat_iswebGl branch October 9, 2024 07:46
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Why does this cause lag?

The project uses Google Performance Diagnosis. isWebGL2 is time-consuming and many methods call the isWebGL2 function. ![lQLPKGVseNT7sT_NBlbNDv6wusCScBdxh74G3NeiGaJQAQ_3838_1622_Copy](https://private-user-images.githubusercontent.com/51403464/374852167-05d2e14e-10ff-4206-bd48-db703c1582 0b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJna jg0NjAyMTUsIm5iZiI6MTcyODQ1OTkxNSwicGF0aCI6Ii81MTQwMzQ2NC8zNzQ4NTIxNjctMDVkMmUxNGUtMTBmZi00MjA2LWJkNDgtZGI3MDNjMTU4MjBiLnBuZz9YLUFtei1BbGdvcml0aG0 9QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGM jAyNDEwMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMDA5 VDA3NDUxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE5Y2RkMGU0Yzc1NjYwYjRmZTVlZWY2OTYyMmI2NGM2MzU5NzhlOTQxMDNjYmQxYzE1Mjc4ODVkZTA1MDY4MGMmWC1Bb XotU2lnbmVkSGVhZGVycz1ob3N0In0.2fzipcUvCqRDMtKl0skkbZofa_Pi3s_c7UJqzxHabAo)

The main reason is that the frequency of calls is high, and multiple calls take a lot of time.

lzxue added a commit that referenced this pull request Oct 9, 2024
* feat: iswebGl2 fixed

* fix: ts error fixed

* fix: namespace change

---------

Co-authored-by: XinyueDu <[email protected]>
Co-authored-by: duxinyue.dxy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants