此会话Cookie方法会降低我的网站性能吗?

I am making a feature for my site now the only issue I want it to be compatible for any forum system with only minor edits needed in case I do decide to move or if the Mybb software (which I currently use) updates and breaks something so I am also preventing this.

Anyway instead of using the default Mybb Username system I have decided to detect if a user is logged in then when they visit a feature for the site on first load (since $_COOKIE requires two loads to become in affect) start a session then on the second load destroy the session and translate it in to a cookie

here's what I have currently have (no where a near fully written)

//if the user is logged in assign a session
if($mybb->user['username']) {
  session_start();
$mybb_username1 = $mybb->user['username'];

$_SESSION['user']=$mybb_username1;
$mybb_username = $_SESSION['user'];
}

Do any of you's have a better method or is this fine?

Just making sure.

i'm also want this to be secure and not slow down any performance of the overall site functionality.

Thanks!