Lagging when I reduce the resolution on web

Godot Version

4

Question

So I have made a settings to reduce the resolution of the game with ai but when I test it on the web it runs at 50-60 fps at 100% resolution and at 10% resolution , I hoped to get doubled perfomance since the work is alot less but it went to 14fps. what could be the reason? I am a begginger and I dont understand much about godot engine I just know some basics btw

extends OptionButton
class_name ResolutionChanger

const SCALES: Array[float] = [
	0.10,
	0.25,
	0.50,
	0.75,
	0.85,
	1.00
]

func _ready() -> void:
	print("==============================")
	print("Resolution Debug Started")
	print("==============================")

	clear()

	add_item("Potato Mode Minus (10% Render)")
	add_item("Potato Mode (25% Render)")
	add_item("Low Quality (50% Render)")
	add_item("Medium Quality (75% Render)")
	add_item("High Quality (85% Render)")
	add_item("Max Quality (100% Render)")

	select(5)

	var root_viewport := get_tree().root

	print("Viewport Size: ", root_viewport.size)
	print("Current scaling_3d_scale: ", root_viewport.scaling_3d_scale)
	print("Current FPS: ", Engine.get_frames_per_second())

	item_selected.connect(_on_scale_selected)

	print("==============================")
func _on_scale_selected(index: int) -> void:
	var root_viewport := get_tree().root

	root_viewport.scaling_3d_scale = SCALES[index]

	print("Scale applied: ", root_viewport.scaling_3d_scale)

	await get_tree().create_timer(2.0).timeout

	print("FPS after 2 seconds: ", Engine.get_frames_per_second())

          [Here is the video](https://drive.google.com/file/d/1g1XIpYRyerJDAxg-ndbUjWzvlxbte6kZ/view?usp=sharing)

it seems way higher framerate on the web, your FPS counter appears to be wrong

I dont think so…

have u checked the video i send in the drive?
please recheck

let me recheck also
alright

I am referring to the video, it looks like your framerate is higher than your FPS display says in the video.

I think i will jsut give up on this and come back later bye
ITS VERY HARD…
will be great if anybody explains to me why

Maybe you can post your FPS counter’s script?

alright

extends CanvasLayer

@onready var player: CharacterBody3D = $“..”

func _on_jump_pressed() → void:player.request_jump()var timer := 0.0


func _process(delta):timer += delta
if timer > 0.5:
	timer = 0.0
	$Control/fps_label.text = str(
		"Fps: ",
		Engine.get_frames_per_second()
	)