[Viveport SDK] DownloadLeaderboardScores callback makes high frame spike

SOLVED
Highlighted
5minlab
Settler

[Viveport SDK] DownloadLeaderboardScores callback makes high frame spi...

Hi there,

I noticed that there is a huge frame drop when downloading a leaderboard using DownloadLeaderboardScores.

I've tested the api UploadLeaderboardScore, it's fine.

It's not a problem of data count. I've tried to download 0 number of leaderboard data, it also made the lag.

It seems asynchronous callback so shouldn't have that kind of lag..

 

I need any viveport developer to help me to reslove this issue.

Thank you.

BAAM SQUAD is evolving now!

Company Website: https://5minlab.com
Game Website: https://bs.5minlab.com
Discord Community: https://discord.gg/9dqnMne

Vive Staff

Re: [Viveport SDK] DownloadLeaderboardScores callback makes high frame...

Hi, 

Thanks for your posting. 

After trying by using our sample code, it works and does not cause the lag symptom. 

Could you please provide your VIVEPORT id for me and your play time? Then I can check on our server side and know if anything wrong. 

Btw, if no concern, could you please provide your code snippet to me as well to see the usage? 

Thanks a lot. 

 

5minlab
Settler

Re: [Viveport SDK] DownloadLeaderboardScores callback makes high frame...

@yakingkuo1

Thank you for reply.

Is there any way to send you reply privately, by mail or direct message?

I don't want to share our id and code privately.

BAAM SQUAD is evolving now!

Company Website: https://5minlab.com
Game Website: https://bs.5minlab.com
Discord Community: https://discord.gg/9dqnMne

5minlab
Settler

Re: [Viveport SDK] DownloadLeaderboardScores callback makes high frame...

Oh, I found that I can send you a PM.
I will provied code snippet to discuss.
BAAM SQUAD is evolving now!

Company Website: https://5minlab.com
Game Website: https://bs.5minlab.com
Discord Community: https://discord.gg/9dqnMne

5minlab
Settler
Solution

Re: [Viveport SDK] DownloadLeaderboardScores callback makes high frame...

Hi, @yakingkuo1.

I fixed the high frame spike problem!


Before:
After downloading the leaderboard data, iterate over all leaderboard entries and update UI data.

While updaing UI data, I used the 'Viveport.User.GetUserName()' for every Name text.

 

After:

Getting the local user name from 'Viveport.User.GetUserName()' when initializing Viveport.

After downloading the leaderboard data, iterate over all leaderboard entries and update UI data.

While updaing UI data, I used the local user name gotten before for every Name text.

 

I think GetUserName function is quite slow to call in loop.

Maybe SDK devs could improve this function.

 

Thanks.

BAAM SQUAD is evolving now!

Company Website: https://5minlab.com
Game Website: https://bs.5minlab.com
Discord Community: https://discord.gg/9dqnMne